Class: Fluent::Counter::Future::Result
- Inherits:
-
Object
- Object
- Fluent::Counter::Future::Result
- Defined in:
- lib/fluent/counter/client.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(result) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(result) ⇒ Result
Returns a new instance of Result.
233 234 235 236 |
# File 'lib/fluent/counter/client.rb', line 233 def initialize(result) @errors = result['errors'] @data = result['data'] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
231 232 233 |
# File 'lib/fluent/counter/client.rb', line 231 def data @data end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
231 232 233 |
# File 'lib/fluent/counter/client.rb', line 231 def errors @errors end |
Instance Method Details
#error? ⇒ Boolean
242 243 244 |
# File 'lib/fluent/counter/client.rb', line 242 def error? !success? end |
#success? ⇒ Boolean
238 239 240 |
# File 'lib/fluent/counter/client.rb', line 238 def success? @errors.nil? || @errors.empty? end |