lib/noe/ext/hash.rb in noe-1.3.0 vs lib/noe/ext/hash.rb in noe-1.4.0

- old
+ new

@@ -33,10 +33,18 @@ end end end module Methodize + + def gem(*args, &block) + if args.empty? && block.nil? && (self[:gem] || self["gem"]) + self[:gem] || self["gem"] + else + super + end + end # Allows using hash.key as a synonym for hash[:key] and # hash['key'] def method_missing(name, *args, &block) if args.empty? and block.nil? @@ -46,6 +54,6 @@ end end end -end \ No newline at end of file +end