Class: ShapeupCli::Commands::Streams
- Defined in:
- lib/shapeup_cli/commands/streams.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 29 30 31 |
# File 'lib/shapeup_cli/commands/streams.rb', line 6 def self. { command: "streams", path: "shapeup streams", short: "List and show streams (product areas)", subcommands: [ { name: "list", short: "List streams (default)", path: "shapeup streams list" }, { name: "show", short: "Show stream details with pitches and issue counts", path: "shapeup streams show <id>" }, { name: "create", short: "Create a stream", path: "shapeup streams create \"Title\"" }, { name: "edit", short: "Update a stream's title, description, or color", path: "shapeup streams edit <id> --title \"New\"" } ], flags: [ { name: "all", type: "bool", usage: "Include archived streams (for list)" }, { name: "title", type: "string", usage: "Stream title (create/edit)" }, { name: "description", type: "string", usage: "Stream description (create/edit)" }, { name: "color", type: "string", usage: "Hex color code (edit)" } ], examples: [ "shapeup streams", "shapeup streams --all --json", "shapeup streams show 3", "shapeup streams create \"Platform\"", "shapeup streams edit 3 --title \"Platform & Infra\" --color \"#3b82f6\"" ] } end |
Instance Method Details
#execute ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/shapeup_cli/commands/streams.rb', line 33 def execute subcommand = positional_arg(0) case subcommand when "show" then show when "create" then create when "edit" then edit when "list", nil then list else subcommand.match?(/\A\d+\z/) ? show(subcommand) : list end end |