lib/ensurance/hash.rb in ensurance-0.1.0 vs lib/ensurance/hash.rb in ensurance-0.1.1

- old
+ new

@@ -1,7 +1,10 @@ +require 'active_support/core_ext/hash' +require 'json' + module Ensurance - class Hash + module Hash def self.ensure(thing) case thing.class.name when "Hash","HashWithIndifferentAccess" thing when "String" @@ -19,6 +22,8 @@ raise ArgumentError.new("Unhandled Type for Hash to ensure: #{thing.class}") end end end end -end +end + +::Hash.include Ensurance::Hash \ No newline at end of file