Class: RemoteExec::Base

Inherits:
Object
  • Object
show all
Extended by:
RubyHooks::InstanceHooks
Defined in:
lib/remote-exec/base.rb

Overview

Define minimal interface for execution handlers

Direct Known Subclasses

Fake, Local, Ssh

Instance Method Summary collapse

Constructor Details

#initializeBase

standard in place handler that ensures shutdown is called



55
56
57
58
59
60
61
62
63
# File 'lib/remote-exec/base.rb', line 55

def initialize
  if block_given?
    begin
      yield self
    ensure
      shutdown
    end
  end
end

Instance Method Details

#shutdownObject

minimal handler for shutdown



66
67
68
# File 'lib/remote-exec/base.rb', line 66

def shutdown
  before_shutdown.changed_and_notify(self)
end