Module: Consumer::Controls::Subscription
- Defined in:
- lib/consumer/controls/subscription.rb
Class Method Summary collapse
Class Method Details
.example(stream_name: nil, next_batch: nil, position: nil, batch_size: nil, count: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/consumer/controls/subscription.rb', line 4 def self.example(stream_name: nil, next_batch: nil, position: nil, batch_size: nil, count: nil) get = Get.example(stream_name: stream_name, batch_size: batch_size, count: count) subscription = ::Consumer::Subscription.new(get) subscription.position = position if position unless next_batch.nil? subscription.next_batch = next_batch end subscription end |