Class: WO::Response
- Inherits:
-
Object
- Object
- WO::Response
- Includes:
- Format::Timeline
- Defined in:
- lib/wo/response.rb,
lib/wo/response/format/timeline.rb
Defined Under Namespace
Modules: Format
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(result) ⇒ Response
constructor
A new instance of Response.
- #to_json ⇒ Object
Methods included from Format::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
#result ⇒ Object (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_json ⇒ Object
10 11 12 |
# File 'lib/wo/response.rb', line 10 def to_json JSON.parse(@result.body) end |