ask_for_spec_from(specs)public
No documentation available.
# File lib/bundler/cli/common.rb, line 51
def self.ask_for_spec_from(specs)
if !$stdout.tty? && ENV["BUNDLE_SPEC_RUN"].nil?
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
end
specs.each_with_index do |spec, index|
Bundler.ui.info "#{index.succ} : #{spec.name}", true
end
Bundler.ui.info "0 : - exit -", true
num = Bundler.ui.ask("> ").to_i
num > 0 ? specs[num - 1] : nil
end