diff --git a/lib/map/struct.rb b/lib/map/struct.rb index d1159d6..cd384d9 100644 --- a/lib/map/struct.rb +++ b/lib/map/struct.rb @@ -19,6 +19,9 @@ def method_missing(method, *args, &block) when /\?$/ key = method.chomp('?') value = @map.has?( key ) + when /\!$/ + key = method.chomp('!') + value = @map.has?( key ) else key = method raise(IndexError, key) unless @map.has_key?(key)