Class: WLang::Compiler::ToRubyCode::IdGen
- Inherits:
-
Object
- Object
- WLang::Compiler::ToRubyCode::IdGen
- Defined in:
- lib/wlang/compiler/to_ruby_code.rb
Instance Method Summary collapse
-
#initialize ⇒ IdGen
constructor
A new instance of IdGen.
- #next ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ IdGen
Returns a new instance of IdGen.
8 |
# File 'lib/wlang/compiler/to_ruby_code.rb', line 8 def initialize; @current = 0; end |
Instance Method Details
#next ⇒ Object
9 |
# File 'lib/wlang/compiler/to_ruby_code.rb', line 9 def next; @current += 1; end |
#to_s ⇒ Object
10 |
# File 'lib/wlang/compiler/to_ruby_code.rb', line 10 def to_s; @current.to_s; end |