Class: Bundler::CLI::Info
- Inherits:
-
Object
- Object
- Bundler::CLI::Info
- Defined in:
- lib/bundler/cli/info.rb
Instance Attribute Summary collapse
-
#gem_name ⇒ Object
readonly
Returns the value of attribute gem_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options, gem_name) ⇒ Info
constructor
A new instance of Info.
- #run ⇒ Object
Constructor Details
#initialize(options, gem_name) ⇒ Info
Returns a new instance of Info.
6 7 8 9 |
# File 'lib/bundler/cli/info.rb', line 6 def initialize(, gem_name) @options = @gem_name = gem_name end |
Instance Attribute Details
#gem_name ⇒ Object (readonly)
Returns the value of attribute gem_name.
5 6 7 |
# File 'lib/bundler/cli/info.rb', line 5 def gem_name @gem_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/bundler/cli/info.rb', line 5 def @options end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bundler/cli/info.rb', line 11 def run Bundler.ui.silence do Bundler.definition.validate_runtime! Bundler.load.lock end spec = spec_for_gem(gem_name) if spec return print_gem_path(spec) if @options[:path] print_gem_info(spec) end end |