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.



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

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.



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

def sym
  @sym
end

Instance Method Details

#call(mod) ⇒ Object



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

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