class Nucleon::Plugin::AgentWrapper
Public Instance Methods
execute(use_network = true, &block)
click to toggle source
Calls superclass method
# File lib/core/plugin/agent_wrapper.rb 13 def execute(use_network = true, &block) 14 super do |node| 15 bin_dir = File.join(network.directory, 'bin') 16 bin_dir = ( File.directory?(bin_dir) ? bin_dir : network.directory ) 17 18 Dir.chdir(bin_dir) do 19 result = node.exec({ :commands => [ block.call(node) ] }).first 20 myself.status = result.status 21 end 22 end 23 end