Skip to content
Newer
Older
100644 23 lines (19 sloc) 469 Bytes
75b2e7e Make sure XmlMini is being correctly autoloaded by Ruby 1.9.1
Luca Guidi authored
1 module ActiveSupport
87d82ef @jeremy Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
jeremy authored
2 # = XmlMini
4458edc @jeremy Use the REXML parser by default. XmlMini.backend = 'LibXML' to use li…
jeremy authored
3 #
4 # To use the much faster libxml parser:
5 # gem 'libxml-ruby', '=0.9.7'
6 # XmlMini.backend = 'LibXML'
75b2e7e Make sure XmlMini is being correctly autoloaded by Ruby 1.9.1
Luca Guidi authored
7 module XmlMini
8 extend self
87d82ef @jeremy Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
jeremy authored
9 delegate :parse, :to => :@backend
b7fef26 @jeremy Extract XmlMini. Namespace FileLike extension.
jeremy authored
10
694998e @tenderlove Nokogiri backend for XmlMini
tenderlove authored
11 class << self
12 attr_reader :backend
13 end
14
87d82ef @jeremy Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
jeremy authored
15 def backend=(name)
16 require "active_support/xml_mini/#{name.to_s.downcase}.rb"
17 @backend = ActiveSupport.const_get("XmlMini_#{name}")
146511e @jeremy Revert "Revert "XmlMini supports different backend parsers, starting …
jeremy authored
18 end
87d82ef @jeremy Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
jeremy authored
19 end
b7fef26 @jeremy Extract XmlMini. Namespace FileLike extension.
jeremy authored
20
4458edc @jeremy Use the REXML parser by default. XmlMini.backend = 'LibXML' to use li…
jeremy authored
21 XmlMini.backend = 'REXML'
87d82ef @jeremy Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
jeremy authored
22 end
Something went wrong with that request. Please try again.