Class: UPresenter::Base
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- UPresenter::Base
- Defined in:
- lib/u_presenter/base.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#view_context ⇒ Object
readonly
Returns the value of attribute view_context.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(object, view_context = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(object, view_context = nil) ⇒ Base
5 6 7 8 9 |
# File 'lib/u_presenter/base.rb', line 5 def initialize(object, view_context = nil) @object = object @view_context = view_context super(@object) end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'lib/u_presenter/base.rb', line 3 def object @object end |
#view_context ⇒ Object (readonly)
Returns the value of attribute view_context.
3 4 5 |
# File 'lib/u_presenter/base.rb', line 3 def view_context @view_context end |
Class Method Details
.present_collection(collection, view_context) ⇒ Object
14 15 16 |
# File 'lib/u_presenter/base.rb', line 14 def present_collection(collection, view_context) CollectionBase.present(collection, self, view_context) end |