Class: Nodes

Inherits:
Array
  • Object
show all
Defined in:
lib/nodes.rb

Instance Method Summary collapse

Instance Method Details

#to_jsonObject



6
7
8
# File 'lib/nodes.rb', line 6

def to_json
  map { |node| node.to_json }.join("\n")
end

#to_s(indent_level = 0, &formatter_block) ⇒ Object



2
3
4
# File 'lib/nodes.rb', line 2

def to_s(indent_level = 0, &formatter_block)
  map { |node| node.to_s(indent_level, &formatter_block) }.join("\n")
end

#to_xmlObject



10
11
12
# File 'lib/nodes.rb', line 10

def to_xml
  map { |node| node.to_xml }.join("\n")
end