Module: TicGitNG::Command::Tag
- Defined in:
- lib/ticgit-ng/command/tag.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ticgit-ng/command/tag.rb', line 11 def execute if .remove puts 'remove' end if ARGV.size > 2 # `ti tag 1234abc tagname1` tic.ticket_tag(ARGV[2], ARGV[1].chomp, ) elsif ARGV.size == 2 # `ti tag tagname1` tic.ticket_tag(ARGV[1], nil, ) else puts 'You need to at least specify one tag to add' puts puts usage end end |
#parser(opts) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/ticgit-ng/command/tag.rb', line 4 def parser(opts) opts. = "Usage: ti tag [tic_id] [options] [tag_name] " opts.on_head( "-d", "--delete", "Remove this tag from the ticket"){|v| .remove = v } end |