Class: Presenter::Base
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
-
#initialize(subject) ⇒ Base
constructor
A new instance of Base.
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
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
5 6 7 |
# File 'lib/presenter/base.rb', line 5 def subject @subject end |