Class: Counter

Inherits:
Object
  • Object
show all
Defined in:
ext/numo/gsl/gen/func_parser.rb

Instance Method Summary collapse

Constructor Details

#initializeCounter

Returns a new instance of Counter.



336
337
338
# File 'ext/numo/gsl/gen/func_parser.rb', line 336

def initialize
  @i = 0
end

Instance Method Details

#incObject



339
340
341
342
343
# File 'ext/numo/gsl/gen/func_parser.rb', line 339

def inc
  i = @i
  @i += 1
  i
end