Class: Hovercraft::Loader
- Inherits:
-
Object
- Object
- Hovercraft::Loader
- Defined in:
- lib/hovercraft/loader.rb
Instance Method Summary collapse
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
- #models ⇒ Object
- #with_each_model ⇒ Object
Constructor Details
Instance Method Details
#models ⇒ Object
18 19 20 |
# File 'lib/hovercraft/loader.rb', line 18 def models @models ||= require_models end |
#with_each_model ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/hovercraft/loader.rb', line 10 def with_each_model models.each do |model_class| model_name = model_class.name.underscore plural_model_name = model_name.pluralize yield(model_class, model_name, plural_model_name) end end |