Class: Ichiban::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/ichiban/loader.rb

Instance Method Summary collapse

Constructor Details

#initializeLoader

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