removed String monkey patch

This commit is contained in:
Shane Becker 2011-06-15 11:49:09 -07:00
parent 60a4a01aef
commit f6fc30c489

View file

@ -41,7 +41,7 @@ module Microformats2
if css_class =~ /^[pnei]/
css_class = css_class[2..-1].gsub("-","_")
method_name = css_class.gsub("-","_")
value = property.text.strip_whitespace
value = property.text.gsub(/\n+/, " ").gsub(/\s+/, " ").strip
obj.class.class_eval { attr_accessor method_name }
@ -155,9 +155,3 @@ module Microformats2
end
end
end
class String
def strip_whitespace
self.gsub(/\n+/, " ").gsub(/\s+/, " ").strip
end
end