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 |
# 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>" } ], flags: [ { name: "all", type: "bool", usage: "Include archived streams (for list)" } ], examples: [ "shapeup streams", "shapeup streams --all --json", "shapeup streams show 3" ] } end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/shapeup_cli/commands/streams.rb', line 26 def execute subcommand = positional_arg(0) case subcommand when "show" then show when "list", nil then list else subcommand.match?(/\A\d+\z/) ? show(subcommand) : list end end |