Class: Kwaff::Document

Inherits:
Node
  • Object
show all
Defined in:
lib/kwaff/node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#empty_lines

Instance Method Summary collapse

Methods inherited from Node

#to_rexml, #to_xml

Constructor Details

#initialize(headers = OrderedHash.new, root = nil) ⇒ Document

Returns a new instance of Document.



64
65
66
67
# File 'lib/kwaff/node.rb', line 64

def initialize(headers=OrderedHash.new, root=nil)
   @headers = headers
   @root = root
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



68
69
70
# File 'lib/kwaff/node.rb', line 68

def headers
  @headers
end

#rootObject

Returns the value of attribute root.



69
70
71
# File 'lib/kwaff/node.rb', line 69

def root
  @root
end

Instance Method Details

#accept(translator, level = 0) ⇒ Object



61
62
63
# File 'lib/kwaff/node.rb', line 61

def accept(translator, level=0)
   return translator.translate_document(self, level)
end