lib/jsonatra.rb in jsonatra-1.0.2 vs lib/jsonatra.rb in jsonatra-1.0.3

- old
+ new

@@ -136,9 +136,25 @@ string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" } string.gsub!('/', '::') string end end + + unless instance_methods.include? :blank? + alias_method :blank?, :empty? + end +end + +class NilClass + unless instance_methods.include? :blank? + def blank?; true; end + end +end + +class Numeric + unless instance_methods.include? :blank? + def blank?; false; end + end end class Symbol unless instance_methods.include? :camelcase def camelcase