Class: Support::Loader
- Inherits:
-
Object
- Object
- Support::Loader
- Defined in:
- lib/support/loader.rb
Instance Method Summary collapse
- #find ⇒ Object
-
#initialize(pattern) ⇒ Loader
constructor
A new instance of Loader.
- #reload? ⇒ Boolean
Constructor Details
#initialize(pattern) ⇒ Loader
Returns a new instance of Loader.
5 6 7 8 9 |
# File 'lib/support/loader.rb', line 5 def initialize(pattern) @pattern = pattern @files = [] @names = [] end |
Instance Method Details
#find ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/support/loader.rb', line 15 def find scan! if reload? unload! load! end modules end |
#reload? ⇒ Boolean
11 12 13 |
# File 'lib/support/loader.rb', line 11 def reload? !last_scanned || !last_loaded || last_loaded < last_modified end |