diff --git a/lib/postal/message_db/delivery.rb b/lib/postal/message_db/delivery.rb index 5b8fe0c..1fbeb48 100644 --- a/lib/postal/message_db/delivery.rb +++ b/lib/postal/message_db/delivery.rb @@ -20,13 +20,13 @@ module Postal end def method_missing(name, value = nil, &block) - return unless @attributes.has_key?(name.to_s) + return unless @attributes.key?(name.to_s) @attributes[name.to_s] end def respond_to_missing?(name) - @attributes.has_key?(name.to_s) + @attributes.key?(name.to_s) end def timestamp diff --git a/lib/postal/message_db/message.rb b/lib/postal/message_db/message.rb index 7b1bff3..7222640 100644 --- a/lib/postal/message_db/message.rb +++ b/lib/postal/message_db/message.rb @@ -178,7 +178,7 @@ module Postal #  Provide access to set and get acceptable attributes # def method_missing(name, value = nil, &block) - if @attributes.has_key?(name.to_s) + if @attributes.key?(name.to_s) @attributes[name.to_s] elsif name.to_s =~ /=\z/ @attributes[name.to_s.gsub("=", "").to_s] = value @@ -187,7 +187,7 @@ module Postal def respond_to_missing?(name) name = name.to_s.sub(/=\z/, "") - @attributes.has_key?(name.to_s) + @attributes.key?(name.to_s) end #