Class: MetaPresenter::Base

Inherits:
Object
  • Object
show all
Includes:
DelegateAllTo, DelegateToController
Defined in:
lib/meta_presenter/base.rb,
lib/meta_presenter/base/delegate_all_to.rb,
lib/meta_presenter/base/delegate_to_controller.rb

Overview

Base presenter class. Inherit from this it in order to get a presenter you can use in your views

Examples:


# app/presenters/application_presenter.rb 
class ApplicationPresenter < MetaPresenter::Base
  def message
    "Hello"
  end
end

Defined Under Namespace

Modules: DelegateAllTo, DelegateToController

Constant Summary

Constants included from DelegateToController

DelegateToController::INCLUDE_PRIVATE_METHODS

Instance Method Summary collapse

Instance Method Details

#inspectString

Displayed in errors involving the presenter

Returns:

  • (String)

    Brief description of this presenter as its class name



26
27
28
29
# File 'lib/meta_presenter/base.rb', line 26

def inspect
  # Concise to not dump too much information on the dev
  "#<#{self.class.name}>"
end