class Nori::Parser::Nokogiri::Document
Attributes
options[RW]
Public Instance Methods
characters(string)
click to toggle source
# File lib/nori/parser/nokogiri.rb, line 29 def characters(string) stack.last.add_node(string) unless string.strip.length == 0 || stack.empty? end
Also aliased as: cdata_block
end_element(name)
click to toggle source
# File lib/nori/parser/nokogiri.rb, line 22 def end_element(name) if stack.size > 1 last = stack.pop stack.last.add_node last end end
stack()
click to toggle source
# File lib/nori/parser/nokogiri.rb, line 14 def stack @stack ||= [] end
start_element(name, attrs = [])
click to toggle source
# File lib/nori/parser/nokogiri.rb, line 18 def start_element(name, attrs = []) stack.push Nori::XMLUtilityNode.new(options, name, Hash[*attrs.flatten]) end