class Rails::Generators::PresenterGenerator
Public Instance Methods
create_presenter_file()
click to toggle source
# File lib/generators/rails/presenter_generator.rb, line 9 def create_presenter_file template 'presenter.rb', File.join('app/presenters', class_path, "#{file_name}_presenter.rb") end
Private Instance Methods
module_namespacing() { || ... }
click to toggle source
# File lib/generators/rails/presenter_generator.rb, line 30 def module_namespacing yield if block_given? end
parent_class_name()
click to toggle source
# File lib/generators/rails/presenter_generator.rb, line 17 def parent_class_name options.fetch("parent") do begin require 'application_presenter' ApplicationPresenter rescue LoadError "StrongPresenter::Presenter" end end end