Module: Tr3llo::Command::Card::Assign

Extended by:
Assign
Included in:
Assign
Defined in:
lib/3llo/command/card/assign.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
20
21
# File 'lib/3llo/command/card/assign.rb', line 7

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

  card = API::Card.find(card_id)

  interface = Application.fetch_interface!()

  interface.print_frame do
    member_ids = select_user(interface, card, board_id)

    assign_card(card_id, member_ids)
    interface.puts("Chosen members have been assigned to the card.")
  end
end