Class: VORuby::ActiveVotable::LibXmlSaxParserWrapper
- Defined in:
- lib/voruby/active_votable/active_votable.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
Instance Method Summary collapse
- #add_listener(event, &proc) ⇒ Object
-
#initialize(file) ⇒ LibXmlSaxParserWrapper
constructor
A new instance of LibXmlSaxParserWrapper.
- #method_missing(symbol, *args) ⇒ Object
Constructor Details
#initialize(file) ⇒ LibXmlSaxParserWrapper
Returns a new instance of LibXmlSaxParserWrapper.
11 12 13 14 |
# File 'lib/voruby/active_votable/active_votable.rb', line 11 def initialize(file) @parser = XML::SaxParser.new self.filename = file end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
25 26 27 |
# File 'lib/voruby/active_votable/active_votable.rb', line 25 def method_missing(symbol, *args) @parser.send(symbol, *args) end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
9 10 11 |
# File 'lib/voruby/active_votable/active_votable.rb', line 9 def filename @filename end |
Instance Method Details
#add_listener(event, &proc) ⇒ Object
21 22 23 |
# File 'lib/voruby/active_votable/active_votable.rb', line 21 def add_listener(event, &proc) @parser.send(event, &proc) end |