Class: KOSapiClient::ResponseLinks
- Inherits:
-
Object
- Object
- KOSapiClient::ResponseLinks
- Defined in:
- lib/kosapi_client/response_links.rb
Instance Attribute Summary collapse
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#prev ⇒ Object
readonly
Returns the value of attribute prev.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(prev_link, next_link) ⇒ ResponseLinks
constructor
A new instance of ResponseLinks.
Constructor Details
#initialize(prev_link, next_link) ⇒ ResponseLinks
Returns a new instance of ResponseLinks.
8 9 10 11 |
# File 'lib/kosapi_client/response_links.rb', line 8 def initialize(prev_link, next_link) @prev = prev_link @next = next_link end |
Instance Attribute Details
#next ⇒ Object (readonly)
Returns the value of attribute next.
6 7 8 |
# File 'lib/kosapi_client/response_links.rb', line 6 def next @next end |
#prev ⇒ Object (readonly)
Returns the value of attribute prev.
6 7 8 |
# File 'lib/kosapi_client/response_links.rb', line 6 def prev @prev end |
Class Method Details
.parse(hash, client) ⇒ Object
15 16 17 18 19 |
# File 'lib/kosapi_client/response_links.rb', line 15 def parse(hash, client) prev_link = parse_link(hash, 'prev', client) next_link = parse_link(hash, 'next', client) new(prev_link, next_link) end |