Class: DelegatedPresenterGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- DelegatedPresenterGenerator
- Defined in:
- lib/generators/delegated_presenter_generator.rb
Instance Method Summary collapse
- #create_presenter_file ⇒ Object
-
#initialize(args, *options) ⇒ DelegatedPresenterGenerator
constructor
:nodoc:.
Constructor Details
#initialize(args, *options) ⇒ DelegatedPresenterGenerator
:nodoc:
4 5 6 7 |
# File 'lib/generators/delegated_presenter_generator.rb', line 4 def initialize(args, *) #:nodoc: args[0] = args[0].gsub(/\./,'_') super end |
Instance Method Details
#create_presenter_file ⇒ Object
9 10 11 |
# File 'lib/generators/delegated_presenter_generator.rb', line 9 def create_presenter_file template "presenter.rb.erb", "app/presenters/#{file_name}_presenter.rb" end |