Exception: ElasticBeans::Command::SSH::NoInstanceError
- Defined in:
- lib/elastic_beans/command/ssh.rb
Instance Method Summary collapse
-
#initialize(environment:, index:) ⇒ NoInstanceError
constructor
A new instance of NoInstanceError.
- #message ⇒ Object
Constructor Details
#initialize(environment:, index:) ⇒ NoInstanceError
Returns a new instance of NoInstanceError.
115 116 117 118 |
# File 'lib/elastic_beans/command/ssh.rb', line 115 def initialize(environment:, index:) @environment = environment @index = index end |
Instance Method Details
#message ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/elastic_beans/command/ssh.rb', line 120 def msg = "The '#{@environment.name}' environment has no instance at index #{@index}.\n" if @index > 0 msg << "Try again with a lower index.\n" else msg << "Wait for instances to be created and try again.\n" end msg << <<-MESSAGE #{command_help "ssh"} MESSAGE msg end |