Class: VORuby::ActiveVotable::LibXmlSaxParserWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/active_votable/active_votable.rb

Direct Known Subclasses

VOTableExtractor

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject

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