diff options
Diffstat (limited to 'lib/chef/resource/mount.rb')
-rw-r--r-- | lib/chef/resource/mount.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb index 3e35325246..32ffee931b 100644 --- a/lib/chef/resource/mount.rb +++ b/lib/chef/resource/mount.rb @@ -1,7 +1,7 @@ # # Author:: Joshua Timberman (<joshua@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2009-2016, Chef Software Inc. +# Copyright:: Copyright 2009-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,6 +30,9 @@ class Chef default_action :mount allowed_actions :mount, :umount, :unmount, :remount, :enable, :disable + # this is a poor API please do not re-use this pattern + property :supports, Hash, default: { remount: false } + def initialize(name, run_context = nil) super @mount_point = name @@ -42,7 +45,6 @@ class Chef @pass = 2 @mounted = false @enabled = false - @supports = { :remount => false } @username = nil @password = nil @domain = nil @@ -140,16 +142,6 @@ class Chef ) end - def supports(args = {}) - if args.is_a? Array - args.each { |arg| @supports[arg] = true } - elsif args.any? - @supports = args - else - @supports - end - end - def username(arg = nil) set_or_return( :username, |