7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/generators/basic_presenter/presenter_generator.rb', line 7
def create_presenter_file
create_file "app/presenters/#{file_name}_presenter.rb", " class \#{class_name}Presenter < ApplicationPresenter\n presents :\#{plural_name.singularize}\n\n # Methods delegated to Presented Class \#{class_name} object's \#{plural_name.singularize}\n @delegation_methods = []\n\n delegate *@delegation_methods, to: :\#{plural_name.singularize}\n\n # Start the methods\n # def full_name\n # first_name + last_name\n # end\n end\n FILE\nend\n"
|