Class: InfluxDB::AsyncQueue::Adapters::TestAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb/async_queue/adapters/test_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTestAdapter

Returns a new instance of TestAdapter.



6
7
8
# File 'lib/influxdb/async_queue/adapters/test_adapter.rb', line 6

def initialize
  @array = []
end

Instance Attribute Details

#arrayObject (readonly)

Returns the value of attribute array.



9
10
11
# File 'lib/influxdb/async_queue/adapters/test_adapter.rb', line 9

def array
  @array
end

Instance Method Details

#pop(batch_size) ⇒ Object



15
16
17
# File 'lib/influxdb/async_queue/adapters/test_adapter.rb', line 15

def pop(batch_size)
  array.shift(batch_size)
end

#push(*points) ⇒ Object



11
12
13
# File 'lib/influxdb/async_queue/adapters/test_adapter.rb', line 11

def push(*points)
  array.push(*points)
end