Class: KOSapiClient::ResponseLinks

Inherits:
Object
  • Object
show all
Defined in:
lib/kosapi_client/response_links.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#nextObject (readonly)

Returns the value of attribute next.



6
7
8
# File 'lib/kosapi_client/response_links.rb', line 6

def next
  @next
end

#prevObject (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