Class: Gem::Commands::CreateCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::CreateCommand
- Defined in:
- lib/rubygems/commands/create_command.rb
Overview
This class facilitates the ‘gem create` command.
Defined Under Namespace
Classes: Builder
Constant Summary collapse
- IDENTIFIER =
'%gem_name%'.freeze
Instance Method Summary collapse
- #defaults_str ⇒ Object
-
#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.
38 39 40 41 |
# File 'lib/rubygems/commands/create_command.rb', line 38 def initialize super "create", "Creates a new RubyGem skeleton" end |
Instance Method Details
#defaults_str ⇒ Object
55 56 57 |
# File 'lib/rubygems/commands/create_command.rb', line 55 def defaults_str '--template-directory ~/.gem/skel --data-file ~/.gem/skel.yml' end |
#execute ⇒ Object
Creates the gem.
44 45 46 47 48 |
# File 'lib/rubygems/commands/create_command.rb', line 44 def execute @gem_name = get_one_gem_name create_gem! end |
#usage ⇒ Object
The usage banner displayed for ‘gem create –help`.
51 52 53 |
# File 'lib/rubygems/commands/create_command.rb', line 51 def usage "gem create GEM_NAME" end |