Class: Gem::Commands::TagCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::TagCommand
- Includes:
- CommandOptions, GemRelease, Helpers
- Defined in:
- lib/rubygems/commands/tag_command.rb
Constant Summary collapse
- DEFAULTS =
{ :quiet => false, :destination => "origin" }
Constants included from GemRelease
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options = {}) ⇒ TagCommand
constructor
A new instance of TagCommand.
Constructor Details
#initialize(options = {}) ⇒ TagCommand
Returns a new instance of TagCommand.
12 13 14 15 16 17 18 |
# File 'lib/rubygems/commands/tag_command.rb', line 12 def initialize( = {}) @name = 'tag' super @name, 'Create a git tag and push it to the destination', () option :quiet, '-q', 'Do not output status messages' option :destination, '-d', 'Git destination' end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/rubygems/commands/tag_command.rb', line 10 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/rubygems/commands/tag_command.rb', line 10 def name @name end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
10 11 12 |
# File 'lib/rubygems/commands/tag_command.rb', line 10 def usage @usage end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/rubygems/commands/tag_command.rb', line 20 def execute [:tag, :push].each do |task| run_cmd(task) end success end |