Class: Imposter::Generators::GenModelsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Imposter::Generators::GenModelsGenerator
- Extended by:
- TemplatePath
- Defined in:
- lib/generators/imposter/gen_models/gen_models_generator.rb
Instance Method Summary collapse
-
#genmodels ⇒ Object
Public models automatically executed.
Methods included from TemplatePath
Instance Method Details
#genmodels ⇒ Object
Public models automatically executed
16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/imposter/gen_models/gen_models_generator.rb', line 16 def genmodels models_dir = Dir.glob(Rails.root.join('app', 'models').to_s + "/*.rb") empty_directory 'test/imposter' # in case it doesn't exist yet read_config_file models_dir.each do |model_dir| genmodel(model_dir) end end |