Class: Showcase::Generators::PresenterGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Showcase::Generators::PresenterGenerator
- Defined in:
- lib/generators/showcase/presenter/presenter_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_presenter ⇒ Object
6 7 8 9 |
# File 'lib/generators/showcase/presenter/presenter_generator.rb', line 6 def create_presenter @base_presenter = File.exist?('app/presenters/base_presenter.rb') ? "BasePresenter" : "Showcase::Presenter" template 'presenter.rb', File.join('app/presenters', class_path, "#{file_name}_presenter.rb") end |