diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-31 09:34:08 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-31 09:34:08 -0700 |
commit | c16cdbb69e4397400eb0237ac2be042a933248c9 (patch) | |
tree | 3acf7c4fe6a0e7d74d0c354ccb7952704ba9f266 /lib/chef | |
parent | 7a1a19a14942636a2dd7ff17a64f44250dd3980e (diff) | |
download | chef-c16cdbb69e4397400eb0237ac2be042a933248c9.tar.gz |
remove more deprecated method_missing access
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/decorator/unchain.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/chef/decorator/unchain.rb b/lib/chef/decorator/unchain.rb index b1e1f9fce1..30179d4e63 100644 --- a/lib/chef/decorator/unchain.rb +++ b/lib/chef/decorator/unchain.rb @@ -38,22 +38,6 @@ class Chef __path__.push(key) @delegate_sd_obj.public_send(__method__, *__path__, value) end - - # unfortunately we have to support method_missing for node.set_unless.foo.bar = 'baz' notation - def method_missing(symbol, *args) - if symbol == :to_ary - merged_attributes.send(symbol, *args) - elsif args.empty? - Chef.deprecated :attributes, %q{method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"])} - self[symbol] - elsif symbol.to_s =~ /=$/ - Chef.deprecated :attributes, %q{method setting of node attributes (node.foo="bar") is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]="bar")} - key_to_set = symbol.to_s[/^(.+)=$/, 1] - self[key_to_set] = (args.length == 1 ? args[0] : args) - else - raise NoMethodError, "Undefined node attribute or method `#{symbol}' on `node'" - end - end end end end |