Class: Chef::Knife::ChopUpload
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ChopUpload
- Includes:
- ChopBase
- Defined in:
- lib/chef/knife/chop_upload.rb
Instance Attribute Summary
Attributes included from ChopLogging
Attributes inherited from Chef::Knife
#ALLACTIONS, #ALLPARTS, #LOGLEVELS, #location, #logger, #prec_max, #rsrctype, #verbosity
Instance Method Summary collapse
-
#run ⇒ Object
——————————————————————————–.
Methods included from ChopBase
#build_option_arguments, #configure_chef, included, #initialize, #parseActionSymbol, #parseList, #parseOptionString, #parsePartSymbol, #parsePath, #parsePrecedence, #parseString, #parse_options, #run_with_pretty_exceptions
Methods included from ChopLogging
#getLogger, #logStep, #logTodo, #setLogger
Methods inherited from Chef::Knife
allactions, allactions=, allparts, allparts=, loglevels, loglevels=, #translate
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/chef/knife/chop_upload.rb', line 31 def run $stdout.sync = true watch_for_break @config[:parts].each{ |p| @config[:actions].each{ |a| actor = @actors[a] raise ChopInternalError.new("Actor for action '#{a.to_s}' cannot be nil!") unless actor method = %(#{a.to_s}_#{p.to_s}) raise ChopError.new "Internal error: Method '#{method}' is not implemented in actor #{actor.class.name}!" unless actor.respond_to?(method,true) actor.send(method) } } end |