Class: ShapeupCli::Commands::Tags
- Defined in:
- lib/shapeup_cli/commands/tags.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#agent_help?, #initialize, run
Constructor Details
This class inherits a constructor from ShapeupCli::Commands::Base
Class Method Details
.metadata ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/shapeup_cli/commands/tags.rb', line 6 def self. { command: "tags", path: "shapeup tags", short: "List, add, and remove tags on pitches and issues", subcommands: [ { name: "list", short: "List the org's tag vocabulary (default)", path: "shapeup tags" }, { name: "add", short: "Tag a pitch or issue", path: "shapeup tags add --pitch <id> <name>" }, { name: "remove", short: "Untag a pitch or issue", path: "shapeup tags remove --pitch <id> <name>" } ], flags: [ { name: "pitch", type: "string", usage: "Pitch ID (for add/remove)" }, { name: "issue", type: "string", usage: "Issue ID (for add/remove)" } ], examples: [ "shapeup tags", "shapeup tags add --pitch 42 q3-plan", "shapeup tags add --issue 7 needs-design", "shapeup tags remove --pitch 42 q3-plan", "shapeup pitches list --tag q3-plan" ] } end |
Instance Method Details
#execute ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/shapeup_cli/commands/tags.rb', line 30 def execute subcommand = positional_arg(0) case subcommand when "add" then add when "remove" then remove when "list", nil then list else list end end |