Class: DMark::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/dmark/translator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tree) ⇒ Translator

Returns a new instance of Translator.



5
6
7
8
9
# File 'lib/dmark/translator.rb', line 5

def initialize(tree)
  @tree = tree

  @out = ''
end

Instance Attribute Details

#outObject (readonly)

Returns the value of attribute out.



3
4
5
# File 'lib/dmark/translator.rb', line 3

def out
  @out
end

Instance Method Details

#runObject



11
12
13
14
# File 'lib/dmark/translator.rb', line 11

def run
  handle(@tree)
  @out
end