Class: Minato::Utils::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



8
9
10
11
12
# File 'lib/minato/utils/response.rb', line 8

def initialize(response)
  @code = response.code
  @header = response.header.to_hash || {}
  @body = Helpers.parse_json(response.body)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/minato/utils/response.rb', line 6

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'lib/minato/utils/response.rb', line 6

def code
  @code
end

#headerObject (readonly)

Returns the value of attribute header.



6
7
8
# File 'lib/minato/utils/response.rb', line 6

def header
  @header
end