Class: InfluxDB::AsyncQueue::Adapters::TestAdapter
- Inherits:
-
Object
- Object
- InfluxDB::AsyncQueue::Adapters::TestAdapter
- Defined in:
- lib/influxdb/async_queue/adapters/test_adapter.rb
Instance Attribute Summary collapse
-
#array ⇒ Object
readonly
Returns the value of attribute array.
Instance Method Summary collapse
-
#initialize ⇒ TestAdapter
constructor
A new instance of TestAdapter.
- #pop(batch_size) ⇒ Object
- #push(*points) ⇒ Object
Constructor Details
#initialize ⇒ TestAdapter
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
#array ⇒ Object (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 |