Class: Bundler::CLI::Add
- Inherits:
-
Object
- Object
- Bundler::CLI::Add
- Defined in:
- lib/bundler/cli/add.rb
Instance Attribute Summary collapse
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options, gems) ⇒ Add
constructor
A new instance of Add.
- #run ⇒ Object
Constructor Details
#initialize(options, gems) ⇒ Add
Returns a new instance of Add.
7 8 9 10 11 12 |
# File 'lib/bundler/cli/add.rb', line 7 def initialize(, gems) @gems = gems @options = @options[:group] = [:group].split(",").map(&:strip) unless [:group].nil? @version = [:version].split(",").map(&:strip) unless [:version].nil? end |
Instance Attribute Details
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
5 6 7 |
# File 'lib/bundler/cli/add.rb', line 5 def gems @gems end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/bundler/cli/add.rb', line 5 def @options end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
5 6 7 |
# File 'lib/bundler/cli/add.rb', line 5 def version @version end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 |
# File 'lib/bundler/cli/add.rb', line 14 def run inject_dependencies perform_bundle_install unless ["skip-install"] end |