Class: TTK::Strategies::RemoteCmd

Inherits:
Cmd show all
Defined in:
lib/ttk/strategies/RemoteCmd.rb

Overview

I’m not maintained any more, don’t use me.

Defined Under Namespace

Classes: HostDispatcher

Instance Attribute Summary

Attributes inherited from CmdBase

#my_exit

Attributes inherited from Strategy

#status, #symtbl

Instance Method Summary collapse

Methods inherited from CmdBase

#initialize

Methods inherited from IOBased

#initialize, #stream, #stream_class=

Methods inherited from Strategy

#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=

Constructor Details

This class inherits a constructor from TTK::Strategies::CmdBase

Instance Method Details

#dispatcher=(doc) ⇒ Object

Raises:

  • (ArgumentError)


63
64
65
66
67
# File 'lib/ttk/strategies/RemoteCmd.rb', line 63

def dispatcher=(doc)
  raise ArgumentError, "require a `hosts' attribute" if doc[:hosts].nil?
	@dispatcher = HostDispatcher.instance
	@dispatcher.hosts = doc[:hosts]
end

#prologueObject



47
48
49
50
51
52
53
# File 'lib/ttk/strategies/RemoteCmd.rb', line 47

def prologue
	if @dispatcher
	  conf = @dispatcher.aConf
	  @login, @port, @hostname = conf.values_at :login, :port, :hostname
	end
	super
end