Module Backports::StdLib
In: lib/backports/tools.rb

Methods

Classes and Modules

Class Backports::StdLib::LoadedFeatures

Attributes

extended_lib  [RW] 

Public Class methods

[Source]

    # File lib/backports/tools.rb, line 62
62:       def extend_relative relative_dir="stdlib"
63:         loaded = Backports::StdLib::LoadedFeatures.new
64:         dir = File.expand_path(relative_dir, File.dirname(caller.first.split(/:\d/,2).first))
65:         Dir.entries(dir).
66:           map{|f| Regexp.last_match(1) if /^(.*)\.rb$/ =~ f}.
67:           compact.
68:           each do |f|
69:             path = File.expand_path(f, dir)
70:             if loaded.include?(f)
71:               require path
72:             else
73:               @extended_lib[f] << path
74:             end
75:           end
76:       end

[Validate]