Class: Gem::Commands::InstallBranchCommand
- Inherits:
-
InstallCommand
- Object
- InstallCommand
- Gem::Commands::InstallBranchCommand
- Defined in:
- lib/rubygems/commands/install_branch_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ InstallBranchCommand
constructor
A new instance of InstallBranchCommand.
Constructor Details
#initialize ⇒ InstallBranchCommand
Returns a new instance of InstallBranchCommand.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rubygems/commands/install_branch_command.rb', line 5 def initialize super add_option '--master', "Install from gem's GitHub 'master' branch" do |value, | @github_branch = 'master' end add_option '--branch BRANCH', "Install from gem's GitHub BRANCH branch" do |value, | @github_branch = value end end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rubygems/commands/install_branch_command.rb', line 17 def execute if @github_branch GemInstallBranch.install([:args].first, @github_branch) else super end end |