Class: Hotdog::Commands::SingularSshAlike

Inherits:
SshAlike show all
Defined in:
lib/hotdog/commands/ssh.rb

Direct Known Subclasses

Scp, Sftp, Ssh

Constant Summary

Constants inherited from BaseCommand

BaseCommand::MASK_DATABASE, BaseCommand::MASK_QUERY, BaseCommand::PERSISTENT_DB

Instance Attribute Summary

Attributes inherited from Search

#remote_command

Attributes inherited from BaseCommand

#application, #logger, #options

Instance Method Summary collapse

Methods inherited from SshAlike

#run

Methods inherited from Search

#evaluate, #get_hosts_with_search_tags, #parse, #parse_options, #run

Methods inherited from BaseCommand

#execute, #fixed_string?, #initialize, #parse_options, #reload, #run

Constructor Details

This class inherits a constructor from Hotdog::Commands::BaseCommand

Instance Method Details

#define_options(optparse, options = {}) ⇒ Object



204
205
206
207
208
209
210
# File 'lib/hotdog/commands/ssh.rb', line 204

def define_options(optparse, options={})
  super
  options[:index] = nil
  optparse.on("-n", "--index INDEX", "Use this index of host if multiple servers are found", Integer) do |index|
    options[:index] = index
  end
end