Class: Fluent::Counter::Future::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/counter/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



231
232
233
# File 'lib/fluent/counter/client.rb', line 231

def data
  @data
end

#errorsObject (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

Returns:

  • (Boolean)


242
243
244
# File 'lib/fluent/counter/client.rb', line 242

def error?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


238
239
240
# File 'lib/fluent/counter/client.rb', line 238

def success?
  @errors.nil? || @errors.empty?
end