diff options
Diffstat (limited to 'lib/chef/resource/dsc_script.rb')
-rw-r--r-- | lib/chef/resource/dsc_script.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb index 633a98c456..a8eeeb1d4f 100644 --- a/lib/chef/resource/dsc_script.rb +++ b/lib/chef/resource/dsc_script.rb @@ -28,12 +28,12 @@ class Chef default_action :run - def initialize(name, run_context=nil) + def initialize(name, run_context = nil) super @imports = {} end - def code(arg=nil) + def code(arg = nil) if arg && command raise ArgumentError, "Only one of 'code' and 'command' attributes may be specified" end @@ -47,7 +47,7 @@ class Chef ) end - def configuration_name(arg=nil) + def configuration_name(arg = nil) if arg && code raise ArgumentError, "Attribute `configuration_name` may not be set if `code` is set" end @@ -58,7 +58,7 @@ class Chef ) end - def command(arg=nil) + def command(arg = nil) if arg && code raise ArgumentError, "The 'code' and 'command' attributes may not be used together" end @@ -69,7 +69,7 @@ class Chef ) end - def configuration_data(arg=nil) + def configuration_data(arg = nil) if arg && configuration_data_script raise ArgumentError, "The 'configuration_data' and 'configuration_data_script' attributes may not be used together" end @@ -80,7 +80,7 @@ class Chef ) end - def configuration_data_script(arg=nil) + def configuration_data_script(arg = nil) if arg && configuration_data raise ArgumentError, "The 'configuration_data' and 'configuration_data_script' attributes may not be used together" end @@ -91,7 +91,7 @@ class Chef ) end - def imports(module_name=nil, *args) + def imports(module_name = nil, *args) if module_name @imports[module_name] ||= [] if args.length == 0 @@ -104,7 +104,7 @@ class Chef end end - def flags(arg=nil) + def flags(arg = nil) set_or_return( :flags, arg, @@ -112,7 +112,7 @@ class Chef ) end - def cwd(arg=nil) + def cwd(arg = nil) set_or_return( :cwd, arg, @@ -120,7 +120,7 @@ class Chef ) end - def environment(arg=nil) + def environment(arg = nil) set_or_return( :environment, arg, @@ -128,7 +128,7 @@ class Chef ) end - def timeout(arg=nil) + def timeout(arg = nil) set_or_return( :timeout, arg, |