microformat 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/microformat/attribute.rb +3 -3
- data/lib/microformat/version.rb +1 -1
- metadata +1 -1
|
@@ -40,9 +40,9 @@ module Microformat
|
|
|
40
40
|
|
|
41
41
|
def cast(value, cast_to = nil)
|
|
42
42
|
value && case cast_to
|
|
43
|
-
|
|
44
|
-
when :decimal then value.to_f
|
|
45
|
-
when :string then value.to_s
|
|
43
|
+
when :integer then value.to_s.strip.to_i
|
|
44
|
+
when :decimal then value.to_s.strip.to_f
|
|
45
|
+
when :string then value.to_s.strip
|
|
46
46
|
else value
|
|
47
47
|
end
|
|
48
48
|
end
|
data/lib/microformat/version.rb
CHANGED