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 }
Constants included from GemRelease
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#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.
11 12 13 14 15 |
# File 'lib/rubygems/commands/tag_command.rb', line 11 def initialize( = {}) super 'tag', 'Create a git tag and push --tags to origin', DEFAULTS.merge() option :quiet, '-q', 'Do not output status messages' end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
9 10 11 |
# File 'lib/rubygems/commands/tag_command.rb', line 9 def arguments @arguments end |
#usage ⇒ Object (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
#execute ⇒ Object
17 18 19 20 21 |
# File 'lib/rubygems/commands/tag_command.rb', line 17 def execute [:tag, :push].each do |task| run_cmd(task) end end |