class ApiPresenter::Generators::PresenterGenerator
Public Instance Methods
create_application_presenter()
click to toggle source
# File lib/generators/api_presenter/presenter/presenter_generator.rb, line 6 def create_application_presenter unless File.exist?('app/presenters/application_api_presenter.rb') copy_file('application_presenter.rb', 'app/presenters/application_api_presenter.rb') end end
create_presenter()
click to toggle source
# File lib/generators/api_presenter/presenter/presenter_generator.rb, line 12 def create_presenter template('presenter.rb', File.join('app/presenters', class_path, "#{file_name}_presenter.rb")) end