class NexusSW::LXD::Transport::Mixins::Helpers::ExecuteMixin::InteractiveResult
Attributes
exitstatus[RW]
stdin[R]
thread[R]
Public Class Methods
new(command, options, stdin, thread = nil)
click to toggle source
Calls superclass method
NexusSW::LXD::Transport::Mixins::Helpers::ExecuteMixin::ExecuteResult::new
# File lib/nexussw/lxd/transport/mixins/helpers/execute.rb, line 58 def initialize(command, options, stdin, thread = nil) super(command, options, nil) @stdin = stdin @thread = thread end
Public Instance Methods
capture_output(&block)
click to toggle source
# File lib/nexussw/lxd/transport/mixins/helpers/execute.rb, line 67 def capture_output(&block) @block = block if block_given? end
error!()
click to toggle source
Calls superclass method
NexusSW::LXD::Transport::Mixins::Helpers::ExecuteMixin::ExecuteResult#error!
# File lib/nexussw/lxd/transport/mixins/helpers/execute.rb, line 80 def error! thread.join if thread.respond_to? :join super end
send_output(stdout_chunk)
click to toggle source
# File lib/nexussw/lxd/transport/mixins/helpers/execute.rb, line 71 def send_output(stdout_chunk) loop do break if @block sleep 0.1 Thread.pass end @block.call stdout_chunk end