Class: ActiveRecord::Turntable::Sequencer::Barrage

Inherits:
ActiveRecord::Turntable::Sequencer show all
Defined in:
lib/active_record/turntable/sequencer/barrage.rb

Instance Method Summary collapse

Methods inherited from ActiveRecord::Turntable::Sequencer

class_for, #release!, #sequence_name, sequence_name

Constructor Details

#initialize(options = {}) ⇒ Barrage

Returns a new instance of Barrage.



7
8
9
10
# File 'lib/active_record/turntable/sequencer/barrage.rb', line 7

def initialize(options = {})
  require "barrage"
  @options = options["options"]
end

Instance Method Details

#current_sequence_value(sequence_name) ⇒ Object



16
17
18
# File 'lib/active_record/turntable/sequencer/barrage.rb', line 16

def current_sequence_value(sequence_name)
  barrage.current
end

#next_sequence_value(sequence_name) ⇒ Object



12
13
14
# File 'lib/active_record/turntable/sequencer/barrage.rb', line 12

def next_sequence_value(sequence_name)
  barrage.next
end