Class: Voodoo::DummyGenerator
- Inherits:
-
Object
- Object
- Voodoo::DummyGenerator
- Defined in:
- lib/voodoo/generators/dummy_generator.rb
Overview
Generator that does not generate code.
Instance Method Summary collapse
- #add(section, *code) ⇒ Object
-
#initialize(*params) ⇒ DummyGenerator
constructor
A new instance of DummyGenerator.
-
#undefined_symbols ⇒ Object
Returns a set of symbols that have been used, but not defined.
- #write(*args) ⇒ Object
Constructor Details
#initialize(*params) ⇒ DummyGenerator
Returns a new instance of DummyGenerator.
7 8 9 10 |
# File 'lib/voodoo/generators/dummy_generator.rb', line 7 def initialize *params @locals = Set.new @symbol_tracker = SymbolTracker.new end |
Instance Method Details
#add(section, *code) ⇒ Object
12 13 14 |
# File 'lib/voodoo/generators/dummy_generator.rb', line 12 def add section, *code analyze code end |
#undefined_symbols ⇒ Object
Returns a set of symbols that have been used, but not defined.
17 18 19 |
# File 'lib/voodoo/generators/dummy_generator.rb', line 17 def undefined_symbols @symbol_tracker.used_but_undefined_symbols end |
#write(*args) ⇒ Object
21 22 |
# File 'lib/voodoo/generators/dummy_generator.rb', line 21 def write *args end |