Module: Tr3llo::Command::Card::Move

Extended by:
Move
Included in:
Move
Defined in:
lib/3llo/command/card/move.rb

Instance Method Summary collapse

Instance Method Details

#execute(key, board_id) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/3llo/command/card/move.rb', line 7

def execute(key, board_id)
  card_id = Entities.parse_id(:card, key)
  assert_card_id!(card_id, key)

  interface = Application.fetch_interface!()

  interface.print_frame do
    selected_list_id = select_list(interface, board_id)

    API::Card.move_to_list(card_id, selected_list_id)
    interface.puts("Card has been moved.")
  end
end