Class: Tr3llo::Command::Card::MoveCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/3llo/commands/card/move.rb

Instance Method Summary collapse

Constructor Details

#initialize(card_id, list_id, board_id) ⇒ MoveCommand

Returns a new instance of MoveCommand.



5
6
7
8
9
# File 'lib/3llo/commands/card/move.rb', line 5

def initialize(card_id, list_id, board_id)
  @card_id = card_id
  @list_id = list_id
  @board_id = board_id
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
# File 'lib/3llo/commands/card/move.rb', line 11

def execute
  interface.print_frame do
    prompt_for_list_id!(board_id) unless list_id
    move_card!
    interface.puts("Card has been moved.")
  end
end