lib/timespan.rb in timespan-0.2.6 vs lib/timespan.rb in timespan-0.2.7
- old
+ new
@@ -35,11 +35,13 @@
@is_new = true
@init_options = options
validate! if options == {}
+ options = {:duration => options} if options.kind_of? Numeric
+
case options
- when Numeric, Duration, String
+ when Duration, String
options = {:duration => options}
end
configure! options
\ No newline at end of file