Class: HTOTConv::Parser::Opml::ListDoc

Inherits:
Nokogiri::XML::SAX::Document
  • Object
show all
Defined in:
lib/htot_conv/parser/opml.rb

Instance Method Summary collapse

Constructor Details

#initialize(outline) ⇒ ListDoc

Returns a new instance of ListDoc.



29
30
31
32
# File 'lib/htot_conv/parser/opml.rb', line 29

def initialize(outline)
  @outline = outline
  @breadcrumb = []
end

Instance Method Details

#end_element(name) ⇒ Object



41
42
43
# File 'lib/htot_conv/parser/opml.rb', line 41

def end_element(name)
  @breadcrumb.pop if (name == "outline")
end

#start_element(name, attrs = []) ⇒ Object



34
35
36
37
38
39
# File 'lib/htot_conv/parser/opml.rb', line 34

def start_element(name, attrs=[])
  if (name == "outline")
    @breadcrumb << name
    generate_outline_item(attrs)
  end
end