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.
9 10 11 12 |
# File 'lib/voruby/active_votable/active_votable.rb', line 9 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
23 24 25 |
# File 'lib/voruby/active_votable/active_votable.rb', line 23 def method_missing(symbol, *args) @parser.send(symbol, *args) end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
7 8 9 |
# File 'lib/voruby/active_votable/active_votable.rb', line 7 def filename @filename end |
Instance Method Details
#add_listener(event, &proc) ⇒ Object
19 20 21 |
# File 'lib/voruby/active_votable/active_votable.rb', line 19 def add_listener(event, &proc) @parser.send(event, &proc) end |