class Rails::PresenterGenerator
Public Instance Methods
copy_presenter_file()
click to toggle source
# File lib/generators/presenter/presenter_generator.rb, line 7 def copy_presenter_file template 'presenter.rb', "app/presenters/#{file_name}_presenter.rb" end
copy_presenter_test_file()
click to toggle source
# File lib/generators/presenter/presenter_generator.rb, line 11 def copy_presenter_test_file if options.test_suite == 'rspec' template 'presenter_spec.rb', "spec/presenters/#{file_name}_presenter_spec.rb" elsif options.test_suite == 'minitest' template 'presenter_test.rb', "test/presenters/#{file_name}_presenter_test.rb" end end
Private Instance Methods
class_name()
click to toggle source
# File lib/generators/presenter/presenter_generator.rb, line 21 def class_name file_name.classify end