Class: WO::Response

Inherits:
Object
  • Object
show all
Includes:
Format::Timeline
Defined in:
lib/wo/response.rb,
lib/wo/response/format/timeline.rb

Defined Under Namespace

Modules: Format

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Format::Timeline

#to_timeline

Constructor Details

#initialize(result) ⇒ Response

Returns a new instance of Response.



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

def initialize(result)
  @result = result
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



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

def result
  @result
end

Instance Method Details

#to_jsonObject



10
11
12
# File 'lib/wo/response.rb', line 10

def to_json
  JSON.parse(@result.body)
end