Class: RSS::NokogiriListener
- Inherits:
-
BaseListener
- Object
- BaseListener
- RSS::NokogiriListener
- Includes:
- ListenerMixin
- Defined in:
- lib/rss/nokogiri.rb
Instance Method Summary collapse
- #cdata_block(string) ⇒ Object
- #characters(string) ⇒ Object
- #comment(string) ⇒ Object
- #end_document ⇒ Object
- #end_element(name) ⇒ Object
- #end_element_namespace(name, prefix = nil, uri = nil) ⇒ Object
- #error(string) ⇒ Object
- #start_document ⇒ Object
- #start_element(name, attrs = []) ⇒ Object
- #start_element_namespace(name, attributes = [], prefix = nil, uri = nil, ns = []) ⇒ Object
- #warning(string) ⇒ Object
- #xmldecl(version, encoding, standalone) ⇒ Object
Instance Method Details
#cdata_block(string) ⇒ Object
77 78 79 |
# File 'lib/rss/nokogiri.rb', line 77 def cdata_block(string) text(string) end |
#characters(string) ⇒ Object
63 64 65 |
# File 'lib/rss/nokogiri.rb', line 63 def characters(string) text(string) end |
#comment(string) ⇒ Object
67 68 |
# File 'lib/rss/nokogiri.rb', line 67 def comment(string) end |
#end_document ⇒ Object
33 34 |
# File 'lib/rss/nokogiri.rb', line 33 def end_document end |
#end_element(name) ⇒ Object
39 40 |
# File 'lib/rss/nokogiri.rb', line 39 def end_element(name) end |
#end_element_namespace(name, prefix = nil, uri = nil) ⇒ Object
57 58 59 60 61 |
# File 'lib/rss/nokogiri.rb', line 57 def end_element_namespace(name, prefix = nil, uri = nil) name = [prefix, name].compact.join(':') tag_end name end |
#error(string) ⇒ Object
73 74 75 |
# File 'lib/rss/nokogiri.rb', line 73 def error(string) raise NotWellFormedError.new(string) if string =~ /Entity '.*' not defined/ end |
#start_document ⇒ Object
30 31 |
# File 'lib/rss/nokogiri.rb', line 30 def start_document end |
#start_element(name, attrs = []) ⇒ Object
36 37 |
# File 'lib/rss/nokogiri.rb', line 36 def start_element(name, attrs = []) end |
#start_element_namespace(name, attributes = [], prefix = nil, uri = nil, ns = []) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rss/nokogiri.rb', line 42 def start_element_namespace(name, attributes = [], prefix = nil, uri = nil, ns = []) name = [prefix, name].compact.join(':') attrs = {} attributes.each do |attr| key = [attr.prefix, attr.localname].compact.join(':') attrs[key] = attr.value end ns.each do |(prefix, uri)| key = ['xmlns', prefix].compact.join(':') attrs[key] = uri end tag_start name, attrs end |
#warning(string) ⇒ Object
70 71 |
# File 'lib/rss/nokogiri.rb', line 70 def warning(string) end |
#xmldecl(version, encoding, standalone) ⇒ Object
26 27 28 |
# File 'lib/rss/nokogiri.rb', line 26 def xmldecl version, encoding, standalone super(version, encoding, standalone == 'yes') end |