Class: ShapeupCli::Commands::MyWork
- Defined in:
- lib/shapeup_cli/commands/my_work.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 |
# File 'lib/shapeup_cli/commands/my_work.rb', line 6 def self. { command: "my-work", path: "shapeup me", short: "Show all pitches, scopes, and tasks assigned to you", aliases: { "me" => "my-work" }, flags: [ { name: "user", type: "string", usage: "User ID to show work for (default: me)" } ], examples: [ "shapeup me", "shapeup me --json", "shapeup my-work --user 5" ] } end |
Instance Method Details
#execute ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/shapeup_cli/commands/my_work.rb', line 23 def execute assignee = extract_option("--user") || "me" result = call_tool("show_my_work", assignee: assignee) render result, summary: assignee == "me" ? "My Work" : "Work for #{assignee}", breadcrumbs: [ { cmd: "shapeup pitch <id>", description: "View pitch details" }, { cmd: "shapeup done <id>", description: "Complete a task" }, { cmd: "shapeup tasks list --assignee me", description: "List just my tasks" } ] end |