class KOSapiClient::KOSapiResponse
Attributes
contents[R]
Public Class Methods
new(contents)
click to toggle source
# File lib/kosapi_client/kosapi_response.rb, line 6 def initialize(contents) @contents = contents end
Public Instance Methods
is_paginated?()
click to toggle source
# File lib/kosapi_client/kosapi_response.rb, line 10 def is_paginated? contents[:atom_feed] end
item()
click to toggle source
# File lib/kosapi_client/kosapi_response.rb, line 22 def item items.first end
items()
click to toggle source
# File lib/kosapi_client/kosapi_response.rb, line 14 def items if is_paginated? contents[:atom_feed][:atom_entry] else [contents[:atom_entry]] end end
links_hash()
click to toggle source
# File lib/kosapi_client/kosapi_response.rb, line 26 def links_hash return nil unless contents[:atom_feed] contents[:atom_feed][:atom_link] end