Class: Presenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Presenter
- Defined in:
- lib/present_foo/presenter.rb
Instance Attribute Summary collapse
-
#presenting_object ⇒ Object
(also: #controller)
Returns the value of attribute presenting_object.
Class Method Summary collapse
Instance Method Summary collapse
- #class ⇒ Object
-
#initialize(obj, *args) ⇒ Presenter
constructor
A new instance of Presenter.
- #obj ⇒ Object
Constructor Details
#initialize(obj, *args) ⇒ Presenter
Returns a new instance of Presenter.
3 4 5 |
# File 'lib/present_foo/presenter.rb', line 3 def initialize(obj, *args) super(obj) end |
Instance Attribute Details
#presenting_object ⇒ Object Also known as: controller
Returns the value of attribute presenting_object.
7 8 9 |
# File 'lib/present_foo/presenter.rb', line 7 def presenting_object @presenting_object end |
Class Method Details
.new_list(objs, *args) ⇒ Object
10 11 12 |
# File 'lib/present_foo/presenter.rb', line 10 def self.new_list(objs, *args) objs.map { |o| new(o) } end |
Instance Method Details
#class ⇒ Object
18 19 20 |
# File 'lib/present_foo/presenter.rb', line 18 def class obj.class end |
#obj ⇒ Object
14 15 16 |
# File 'lib/present_foo/presenter.rb', line 14 def obj __getobj__ end |