Class: Gem::Commands::FakeCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::FakeCommand
- Defined in:
- lib/rubygems_plugin.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ FakeCommand
constructor
A new instance of FakeCommand.
-
#summary ⇒ Object
:nodoc:.
-
#usage ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ FakeCommand
Returns a new instance of FakeCommand.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rubygems_plugin.rb', line 6 def initialize super "fake", "Make RubyGems think that the named gem is already installed." add_option( "-v", "--version VERSION", "Specify a version for the gem (default is #{FakeGem::DEFAULT_VERSION})" ) do |value, | [:version] = value end end |
Instance Method Details
#execute ⇒ Object
25 26 27 28 29 |
# File 'lib/rubygems_plugin.rb', line 25 def execute [:args].each do |gemname| FakeGem.new(gemname, ).install end end |
#summary ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/rubygems_plugin.rb', line 17 def summary # :nodoc: FakeGem::SUMMARY end |
#usage ⇒ Object
:nodoc:
21 22 23 |
# File 'lib/rubygems_plugin.rb', line 21 def usage # :nodoc: "#{program_name} GEMNAME [GEMNAME ...]" end |