Class: WebMock::Resources::Sequence

Inherits:
Object
  • Object
show all
Defined in:
lib/webmock-resources/sequence.rb

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Sequence

Returns a new instance of Sequence.



4
5
6
# File 'lib/webmock-resources/sequence.rb', line 4

def initialize
  @value = 0
end

Instance Method Details

#curr ⇒ Object



12
13
14
# File 'lib/webmock-resources/sequence.rb', line 12

def curr
  @value
end

#next ⇒ Object



8
9
10
# File 'lib/webmock-resources/sequence.rb', line 8

def next
  @value = @value.next
end