Class: TTK::Strategies::RemoteCmd::HostDispatcher
- Includes:
- Singleton
- Defined in:
- lib/ttk/strategies/RemoteCmd.rb
Instance Attribute Summary collapse
-
#hosts ⇒ Object
Returns the value of attribute hosts.
Instance Method Summary collapse
- #<<(aConf) ⇒ Object
- #aConf ⇒ Object
-
#initialize ⇒ HostDispatcher
constructor
A new instance of HostDispatcher.
Constructor Details
#initialize ⇒ HostDispatcher
Returns a new instance of HostDispatcher.
21 22 23 |
# File 'lib/ttk/strategies/RemoteCmd.rb', line 21 def initialize @hosts = [] end |
Instance Attribute Details
#hosts ⇒ Object
Returns the value of attribute hosts.
19 20 21 |
# File 'lib/ttk/strategies/RemoteCmd.rb', line 19 def hosts @hosts end |
Instance Method Details
#<<(aConf) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/ttk/strategies/RemoteCmd.rb', line 25 def << ( aConf ) unless aConf.is_a? Hash raise ArgumentError, "not a valid conf: `#{aConf}:#{aConf.class}'" end @hosts << aConf end |
#aConf ⇒ Object
37 38 39 40 41 |
# File 'lib/ttk/strategies/RemoteCmd.rb', line 37 def aConf aConf = hosts.shift hosts.push aConf aConf end |