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