method
ask_for_spec_from

v2_6_3 -
Show latest stable
-
0 notes -
Class: Common
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
ask_for_spec_from(specs)
public
Hide source
# 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