Method: EY::AmbiguousEnvironmentGitUriError#initialize
- Defined in:
- lib/engineyard/error.rb
#initialize(environments) ⇒ AmbiguousEnvironmentGitUriError
Returns a new instance of AmbiguousEnvironmentGitUriError.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/engineyard/error.rb', line 22 def initialize(environments) = "The repository url in this directory is ambiguous.\n" << "Please use -e <envname> to specify one of the following environments:\n" environments.sort do |a, b| if a.account == b.account a.name <=> b.name else a.account.name <=> b.account.name end end.each { |env| << "\t#{env.name} (#{env.account.name})\n" } super end |