Class: Facile::Response::Wrapper::Json

Inherits:
Object
  • Object
show all
Defined in:
lib/facile/response/wrapper/json.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ Json

Returns a new instance of Json.



4
5
6
7
# File 'lib/facile/response/wrapper/json.rb', line 4

def initialize(body)
  @body = body
  @parsed_body = ::Facile::Response::Wrapper::Mash.new(JSON.parse(body))
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



13
14
15
# File 'lib/facile/response/wrapper/json.rb', line 13

def body
  @body
end

#parsed_bodyObject (readonly)

Returns the value of attribute parsed_body.



13
14
15
# File 'lib/facile/response/wrapper/json.rb', line 13

def parsed_body
  @parsed_body
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/facile/response/wrapper/json.rb', line 9

def to_s
  @body
end