Class: UntilUser

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/virtualizees/until_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ UntilUser

Returns a new instance of UntilUser.



2
3
4
5
6
# File 'lib/spec/virtualizees/until_user.rb', line 2

def initialize(value)
  @value = value
  @i = 0
  @counts = []
end

Instance Method Details

#until_count_to_valueObject



8
9
10
11
12
13
14
15
# File 'lib/spec/virtualizees/until_user.rb', line 8

def until_count_to_value
  until @i > @value
    @counts << @i
    @i += 1
  end

  @counts
end