Class: Lazylead::Requires
- Inherits:
-
Object
- Object
- Lazylead::Requires
- Defined in:
- lib/lazylead/requires.rb
Overview
Allows to load all ruby files within particular dir.
Instance Method Summary collapse
-
#initialize(dir) ⇒ Requires
constructor
A new instance of Requires.
- #load ⇒ Object
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
#load ⇒ Object
34 35 36 |
# File 'lib/lazylead/requires.rb', line 34 def load Dir[File.join(@dir, "*.rb")].sort.each { |f| require f } end |