class Chef::Resource::Script

Public Class Methods

new(name, run_context = nil) click to toggle source
Calls superclass method Chef::Resource::Execute.new
# File lib/chef/resource/script.rb, line 34
def initialize(name, run_context = nil)
  super
  @command = nil
  @default_guard_interpreter = :default
end

Public Instance Methods

command(arg = nil) click to toggle source

FIXME: remove this and use an execute sub-resource instead of inheriting from Execute

Calls superclass method Chef::Resource::Execute#command
# File lib/chef/resource/script.rb, line 41
def command(arg = nil)
  unless arg.nil?
    raise Chef::Exceptions::Script, "Do not use the command attribute on a #{resource_name} resource, use the 'code' attribute instead."
  end
  super
end