lib/ensurance/time.rb in ensurance-0.1.0 vs lib/ensurance/time.rb in ensurance-0.1.1
- old
+ new
@@ -1,7 +1,9 @@
+require 'active_support/core_ext/time'
+
module Ensurance
- class Time
+ module Time
def self.ensure(thing)
case thing.class.name
when "NilClass"
thing
when "Time"
@@ -26,5 +28,7 @@
end
end
end
end
end
+
+::Time.include Ensurance::Time
\ No newline at end of file