Class: FixtureFactory::Sequence

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/fixture_factory/sequence.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeSequence

Returns a new instance of Sequence.



7
8
9
# File 'lib/fixture_factory/sequence.rb', line 7

def initialize
  @count = 0
end

Instance Method Details

#eachObject



15
16
17
# File 'lib/fixture_factory/sequence.rb', line 15

def each
  loop { yield(self.next) }
end

#nextObject



11
12
13
# File 'lib/fixture_factory/sequence.rb', line 11

def next
  @count += 1
end