Class: Rucc::StaticLabelGen

Inherits:
Object
  • Object
show all
Defined in:
lib/rucc/static_label_gen.rb

Instance Method Summary collapse

Constructor Details

#initializeStaticLabelGen

Returns a new instance of StaticLabelGen.



3
4
5
# File 'lib/rucc/static_label_gen.rb', line 3

def initialize
  @id = 0  # [Integer]
end

Instance Method Details

#next(name) ⇒ String

Parameters:

  • (String)

Returns:

  • (String)


9
10
11
12
13
# File 'lib/rucc/static_label_gen.rb', line 9

def next(name)
  static_label = ".S#{@id}.#{name}"
  @id += 1
  static_label
end