Class: DMark::Translator
- Inherits:
-
Object
- Object
- DMark::Translator
- Defined in:
- lib/d-mark/translator.rb
Instance Attribute Summary collapse
-
#out ⇒ Object
readonly
Returns the value of attribute out.
Instance Method Summary collapse
-
#initialize(nodes) ⇒ Translator
constructor
A new instance of Translator.
- #run ⇒ Object
Constructor Details
#initialize(nodes) ⇒ Translator
Returns a new instance of Translator.
5 6 7 8 9 |
# File 'lib/d-mark/translator.rb', line 5 def initialize(nodes) @nodes = nodes @out = '' end |
Instance Attribute Details
#out ⇒ Object (readonly)
Returns the value of attribute out.
3 4 5 |
# File 'lib/d-mark/translator.rb', line 3 def out @out end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 |
# File 'lib/d-mark/translator.rb', line 11 def run @nodes.each do |node| handle(node) end @out end |