class ROM::Factory::Attributes::Sequence
Attributes
block[R]
count[R]
name[R]
Public Class Methods
new(name, &block)
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 8 def initialize(name, &block) @name = name @count = 0 @block = block end
Public Instance Methods
call(*args)
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 14 def call(*args) block.call(increment, *args) end
dependency_names()
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 26 def dependency_names EMPTY_ARRAY end
increment()
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 22 def increment @count += 1 end
parameters()
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 30 def parameters block.parameters end
to_proc()
click to toggle source
# File lib/rom/factory/attributes/sequence.rb, line 18 def to_proc method(:call).to_proc end