Class: Prospecto::PresenterGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Prospecto::PresenterGenerator
- Defined in:
- lib/generators/prospecto/presenter/presenter_generator.rb
Instance Method Summary collapse
Instance Method Details
#write_presenter ⇒ Object
5 6 7 |
# File 'lib/generators/prospecto/presenter/presenter_generator.rb', line 5 def write_presenter template 'presenter.rb', "app/presenters/#{file_name_root}_presenter.rb" end |
#write_presenter_spec ⇒ Object
9 10 11 |
# File 'lib/generators/prospecto/presenter/presenter_generator.rb', line 9 def write_presenter_spec template 'presenter_spec.rb', "spec/presenters/#{file_name_root}_presenter_spec.rb" end |