Parent

Methods

Class/Module Index [+]

Quicksearch

Ruote::XmlReader::Node

A helper class to store the temporary tree while it gets read.

Attributes

attributes[R]
children[R]
parent[R]

Public Class Methods

new(parent, name, atts) click to toggle source
# File lib/ruote/reader/xml.rb, line 50
def initialize(parent, name, atts)

  @parent = parent
  @name = name
  @attributes = atts.remap { |(k, v), h| h[k.gsub(/-/, '_')] = v }
  @children = []

  parent.children << self if parent
end

Public Instance Methods

to_a() click to toggle source
# File lib/ruote/reader/xml.rb, line 60
def to_a

  [ @name, @attributes, @children.collect { |c| c.to_a } ]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.