Class: Troo::Commands::Move::Card
- Inherits:
-
Object
- Object
- Troo::Commands::Move::Card
- Defined in:
- lib/troo/cli/commands/move/card.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(card_id, list_id, board_id = nil) ⇒ Object
constructor
[].
-
#move ⇒ Object
[].
Constructor Details
#initialize(card_id, list_id, board_id = nil) ⇒ Object
Returns [].
19 20 21 |
# File 'lib/troo/cli/commands/move/card.rb', line 19 def initialize(card_id, list_id, board_id = nil) @card_id, @list_id, @board_id = card_id, list_id, board_id end |
Class Method Details
.dispatch(card_id, list_id, board_id = nil) ⇒ Object
Returns [].
10 11 12 |
# File 'lib/troo/cli/commands/move/card.rb', line 10 def dispatch(card_id, list_id, board_id = nil) new(card_id, list_id, board_id).move end |
Instance Method Details
#move ⇒ Object
Returns [].
24 25 26 27 28 29 30 |
# File 'lib/troo/cli/commands/move/card.rb', line 24 def move return 'Card cannot be found.' if card_not_found? return 'List cannot be found.' if list_not_found? return 'Board cannot be found.' if board_not_found? return success if moved error end |