Class: Legs::AsyncData
- Inherits:
-
Object
- Object
- Legs::AsyncData
- Defined in:
- lib/legs.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ AsyncData
constructor
A new instance of AsyncData.
- #result ⇒ Object (also: #value)
Constructor Details
#initialize(data) ⇒ AsyncData
Returns a new instance of AsyncData.
342 |
# File 'lib/legs.rb', line 342 def initialize(data); @data = data; end |
Instance Method Details
#result ⇒ Object Also known as: value
343 344 345 346 |
# File 'lib/legs.rb', line 343 def result @errored = true and raise @data['error'] if @data['error'] unless @errored return @data['result'] end |