Class: DecentPresenter::Base

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Exposable
Defined in:
lib/decent_presenter/base.rb

Instance Method Summary collapse

Methods included from Exposable

#present

Constructor Details

#initialize(object, view_context) ⇒ Base

Returns a new instance of Base.



11
12
13
14
# File 'lib/decent_presenter/base.rb', line 11

def initialize(object, view_context)
  super(object)
  @view_context = view_context
end

Instance Method Details

#helpersObject Also known as: h



22
23
24
# File 'lib/decent_presenter/base.rb', line 22

def helpers
  view_context
end

#modelObject Also known as: object



16
17
18
# File 'lib/decent_presenter/base.rb', line 16

def model
  __getobj__
end