microformat 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- 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