Class: Gem::Commands::CreateCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::CreateCommand
- Defined in:
- lib/rubygems/commands/create_command.rb
Overview
The Gem::Commands::CreateCommand class facilitates the ‘gem create` command.
Constant Summary collapse
- TEMPLATES =
Default path to templates provided by this plugin.
File.('../../create/templates', __FILE__)
Instance Method Summary collapse
-
#execute ⇒ Object
Creates the gem.
-
#initialize ⇒ CreateCommand
constructor
Initializes the plugin.
-
#usage ⇒ Object
The usage banner displayed for ‘gem create –help`.
Constructor Details
#initialize ⇒ CreateCommand
Initializes the plugin.
12 13 14 15 |
# File 'lib/rubygems/commands/create_command.rb', line 12 def initialize super "create", "Creates a new RubyGem skeleton" end |
Instance Method Details
#execute ⇒ Object
Creates the gem.
18 19 20 21 |
# File 'lib/rubygems/commands/create_command.rb', line 18 def execute @gem_name = get_one_gem_name create_gem! end |
#usage ⇒ Object
The usage banner displayed for ‘gem create –help`.
24 25 26 |
# File 'lib/rubygems/commands/create_command.rb', line 24 def usage "gem create GEM_NAME" end |