lib/mixlib/config.rb in mixlib-config-2.2.8 vs lib/mixlib/config.rb in mixlib-config-2.2.10

- old
+ new

@@ -1,10 +1,10 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Nuo Yan (<nuo@chef.io>) # Author:: Christopher Brown (<cb@chef.io>) -# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc. +# Copyright:: Copyright (c) 2008-2018, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -150,12 +150,14 @@ # key<Symbol>:: The config option to check for # # === Returns # <True>:: If the config option exists # <False>:: If the config option does not exist - def has_key?(key) + def key?(key) configuration.has_key?(key.to_sym) end + + alias_method :has_key?, :key? # Resets a config option to its default. # # === Parameters # symbol<Symbol>:: Name of the config option