Merge branch 'master' of github.com:veganstraightedge/microformats2

Conflicts:
	lib/microformats2.rb
	test/test_microformats2.rb
This commit is contained in:
Brian Miller 2011-06-28 19:49:23 -07:00
commit ea8a526da3
3 changed files with 371 additions and 18 deletions

View file

@ -10,6 +10,8 @@ module Microformats2
def self.parse(html)
raise LoadError, "argument must be a String or File" unless [String, File].include?(html.class)
html = html.read if IO === html
doc = Nokogiri::HTML(html)
microformats = Hash.new{|hash, key| hash[key] = Array.new}
doc.css("*[class*=h-]").each do |microformat|
@ -37,7 +39,7 @@ module Microformats2
end
end
return microformats
microformats
end
def self.add_method(obj, method_name)