Class: FedgerAPI::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/fedger_api/response.rb

Overview

Class implements response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



6
7
8
9
# File 'lib/fedger_api/response.rb', line 6

def initialize(response)
  @response = response
  create_keys!
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/fedger_api/response.rb', line 4

def response
  @response
end

Instance Method Details

#to_aObject



15
16
17
# File 'lib/fedger_api/response.rb', line 15

def to_a
  response.map { |k, v| [k, v] }
end

#to_hObject



11
12
13
# File 'lib/fedger_api/response.rb', line 11

def to_h
  response.to_h
end