Class: Clashinator::ArrayResource::Cursor
- Inherits:
-
Object
- Object
- Clashinator::ArrayResource::Cursor
- Defined in:
- lib/clashinator/array_resource.rb
Overview
This class represent the cursor model that contains an after attribute, a before attribute or neither, for properly paging array resources
Instance Attribute Summary collapse
-
#after ⇒ Object
Returns the value of attribute after.
-
#before ⇒ Object
Returns the value of attribute before.
Instance Method Summary collapse
-
#initialize(cursor_hash) ⇒ Cursor
constructor
A new instance of Cursor.
Constructor Details
#initialize(cursor_hash) ⇒ Cursor
Returns a new instance of Cursor.
33 34 35 36 |
# File 'lib/clashinator/array_resource.rb', line 33 def initialize(cursor_hash) @after = cursor_hash['after'] if cursor_hash.key?('after') @before = cursor_hash['before'] if cursor_hash.key?('before') end |
Instance Attribute Details
#after ⇒ Object
Returns the value of attribute after.
31 32 33 |
# File 'lib/clashinator/array_resource.rb', line 31 def after @after end |
#before ⇒ Object
Returns the value of attribute before.
31 32 33 |
# File 'lib/clashinator/array_resource.rb', line 31 def before @before end |