class Automatic::OPML::DOM::Element
Attributes
attr[R]
children[R]
parent[RW]
Public Class Methods
new()
click to toggle source
# File lib/automatic/opml.rb, line 34 def initialize @attr = {} @parent = nil @children = [] end
Public Instance Methods
<<(elem)
click to toggle source
# File lib/automatic/opml.rb, line 51 def <<(elem) elem.parent = self if elem.respond_to? :parent= @children << elem self end
[](n)
click to toggle source
# File lib/automatic/opml.rb, line 57 def [](n) if n.is_a? String @attr[n] else @children[n] end end
[]=(k,v)
click to toggle source
# File lib/automatic/opml.rb, line 65 def []=(k,v) if k.is_a? String @attr[k] = v else @children[k] = v end end
each() { |self| ... }
click to toggle source
# File lib/automatic/opml.rb, line 42 def each yield self @children.each {|c| c.each {|x| yield x } } end
is_breaakpoint?()
click to toggle source
# File lib/automatic/opml.rb, line 85 def is_breaakpoint? @attr['isBreakpoint']=='true' end
is_comment?()
click to toggle source
# File lib/automatic/opml.rb, line 81 def is_comment? @attr['isComment']=='true' end
text()
click to toggle source
# File lib/automatic/opml.rb, line 73 def text @attr['text'] end
type()
click to toggle source
# File lib/automatic/opml.rb, line 77 def type @attr['type'] end