diff options
author | Seth Vargo <sethvargo@gmail.com> | 2014-06-03 16:55:22 -0400 |
---|---|---|
committer | Seth Vargo <sethvargo@gmail.com> | 2014-06-03 16:55:22 -0400 |
commit | d4548e5c898a032c6751e25734371213a1b165c9 (patch) | |
tree | 4a0f893fcd2848a036caefb34333fbbbe5ec56be | |
parent | 34cb9a7a2a0a2c848cf06c0b3c8a417f41238f80 (diff) | |
download | mixlib-config-d4548e5c898a032c6751e25734371213a1b165c9.tar.gz |
Rename has_key? -> key? (BC compatible)
Ruby has moved away from has_key?, so mixlib should as well.
-rw-r--r-- | lib/mixlib/config.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mixlib/config.rb b/lib/mixlib/config.rb index 3ef6a3c..442c40f 100644 --- a/lib/mixlib/config.rb +++ b/lib/mixlib/config.rb @@ -92,9 +92,10 @@ module Mixlib # === Returns # <True>:: If the config option exists # <False>:: If the config option does not exist - def has_key?(key) + def key?(key) self.configuration.has_key?(key.to_sym) end + alias_method :has_key?, :key? # Resets a config option to its default. # |