Class: Gem::Commands::TagCommand

Inherits:
Gem::Command
  • Object
show all
Includes:
CommandOptions, GemRelease, Helpers
Defined in:
lib/rubygems/commands/tag_command.rb

Constant Summary collapse

DEFAULTS =
{
  :quiet => false
}

Constants included from GemRelease

GemRelease::VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TagCommand

Returns a new instance of TagCommand.


11
12
13
14
15
# File 'lib/rubygems/commands/tag_command.rb', line 11

def initialize(options = {})
  super 'tag', 'Create a git tag and push --tags to origin', DEFAULTS.merge(options)

  option :quiet, '-q', 'Do not output status messages'
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments


9
10
11
# File 'lib/rubygems/commands/tag_command.rb', line 9

def arguments
  @arguments
end

#usageObject (readonly)

Returns the value of attribute usage


9
10
11
# File 'lib/rubygems/commands/tag_command.rb', line 9

def usage
  @usage
end

Instance Method Details

#executeObject


17
18
19
20
# File 'lib/rubygems/commands/tag_command.rb', line 17

def execute
  tag
  push
end