Class: Lazylead::Requires

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

Overview

Allows to load all ruby files within particular dir.

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ Requires

Returns a new instance of Requires.



30
31
32
# File 'lib/lazylead/requires.rb', line 30

def initialize(dir)
  @dir = dir
end

Instance Method Details

#loadObject



34
35
36
# File 'lib/lazylead/requires.rb', line 34

def load
  Dir[File.join(@dir, "*.rb")].sort.each { |f| require f }
end