Module: HTML5::TreeBuilders
- Defined in:
- lib/feed_tools/vendor/html5/lib/html5/treebuilders.rb,
lib/feed_tools/vendor/html5/lib/html5/treebuilders/base.rb,
lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb,
lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb,
lib/feed_tools/vendor/html5/lib/html5/treebuilders/simpletree.rb
Defined Under Namespace
Modules: Base, Hpricot, REXML, SimpleTree
Class Method Summary collapse
- .[](name) ⇒ Object (also: get_tree_builder)
Class Method Details
.[](name) ⇒ Object Also known as: get_tree_builder
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders.rb', line 5 def [](name) case name.to_s.downcase when 'simpletree' then require 'html5/treebuilders/simpletree' SimpleTree::TreeBuilder when 'rexml' then require 'html5/treebuilders/rexml' REXML::TreeBuilder when 'hpricot' then require 'html5/treebuilders/hpricot' Hpricot::TreeBuilder else raise "Unknown TreeBuilder #{name}" end end |