Class: Ichiban::Loader
- Inherits:
-
Object
- Object
- Ichiban::Loader
- Defined in:
- lib/ichiban/loader.rb
Instance Method Summary collapse
-
#change(file) ⇒ Object
Pass in an Ichiban::ProjectFile.
-
#initialize ⇒ Loader
constructor
Load all models and helpers in Ichiban.project_root.
Constructor Details
#initialize ⇒ Loader
Load all models and helpers in Ichiban.project_root
13 14 15 16 |
# File 'lib/ichiban/loader.rb', line 13 def initialize @loaded_constants = [] load_all end |
Instance Method Details
#change(file) ⇒ Object
Pass in an Ichiban::ProjectFile.
4 5 6 7 8 9 10 |
# File 'lib/ichiban/loader.rb', line 4 def change(file) if file.is_a?(Ichiban::HelperFile) or file.is_a?(Ichiban::ModelFile) delete_all load_all Ichiban.logger.reload(file.abs) end end |