Class: Peanuts::XML::Reader

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/peanuts/xml.rb

Direct Known Subclasses

LibXML::Reader

Class Method Summary collapse

Class Method Details

.new(*args, &block) ⇒ Object



45
46
47
48
49
50
# File 'lib/peanuts/xml.rb', line 45

def self.new(*args, &block)
  cls = self == Reader ? XML.default::Reader : self
  obj = cls.allocate
  obj.send(:initialize, *args, &block)
  obj
end