Class: Pagoid::PagingAdapter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Pagoid::PagingAdapter
- Defined in:
- lib/pagoid/paging_adapter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#paginatable ⇒ Object
Returns the value of attribute paginatable.
Instance Method Summary collapse
- #chain(object, state = {}) ⇒ Object
- #coerce(coerceable = paginatable) ⇒ Object
-
#initialize(paginatable, attributes = {}) ⇒ PagingAdapter
constructor
A new instance of PagingAdapter.
Constructor Details
#initialize(paginatable, attributes = {}) ⇒ PagingAdapter
Returns a new instance of PagingAdapter.
7 8 9 10 11 |
# File 'lib/pagoid/paging_adapter.rb', line 7 def initialize(paginatable, attributes = {}) self.paginatable = paginatable self.attributes = attributes super coerce end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/pagoid/paging_adapter.rb', line 5 def attributes @attributes end |
#paginatable ⇒ Object
Returns the value of attribute paginatable.
4 5 6 |
# File 'lib/pagoid/paging_adapter.rb', line 4 def paginatable @paginatable end |
Instance Method Details
#chain(object, state = {}) ⇒ Object
23 24 25 |
# File 'lib/pagoid/paging_adapter.rb', line 23 def chain(object, state = {}) self.class.new object, state end |
#coerce(coerceable = paginatable) ⇒ Object
13 14 15 |
# File 'lib/pagoid/paging_adapter.rb', line 13 def coerce(coerceable = paginatable) coerceable end |