Class: Presenter::Base

Inherits:
Object
  • Object
show all
Includes:
Naming
Defined in:
lib/presenter/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Naming

#model_object_name_from_presenter, #presenter_from_model_object

Constructor Details

#initialize(subject) ⇒ Base

Returns a new instance of Base.



7
8
9
# File 'lib/presenter/base.rb', line 7

def initialize(subject)
  @subject = subject
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (protected)



13
14
15
# File 'lib/presenter/base.rb', line 13

def method_missing(method, *args, &block)
  subject.send(method, *args, &block)
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/presenter/base.rb', line 5

def subject
  @subject
end