Class: Requirium::RequireLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/require_loader.rb

Direct Known Subclasses

LoadLoader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sym, paths, dirname = nil) ⇒ RequireLoader

Returns a new instance of RequireLoader.



5
6
7
8
# File 'lib/require_loader.rb', line 5

def initialize(sym, paths, dirname = nil)
  @sym = sym
  @paths = clean_paths(paths, dirname)
end

Instance Attribute Details

#symObject (readonly)

Returns the value of attribute sym.



3
4
5
# File 'lib/require_loader.rb', line 3

def sym
  @sym
end

Instance Method Details

#call(mod) ⇒ Object



10
11
12
13
# File 'lib/require_loader.rb', line 10

def call(mod)
  @paths.each { |filename| mod.send(method, filename) }
  nil
end