Module: Tr3llo::Command::Card::RemoveItem

Extended by:
RemoveItem
Included in:
RemoveItem
Defined in:
lib/3llo/command/card/remove_item.rb

Instance Method Summary collapse

Instance Method Details

#execute(card_key, item_key) ⇒ Object



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

def execute(card_key, item_key)
  card_id = Entities.parse_id(:card, card_key)
  item_id = Entities.parse_id(:check_item, item_key)
  API::Checklist.delete_item(card_id, item_id)

  interface = Application.fetch_interface!()

  interface.print_frame do
    interface.puts("Item has been removed")
  end
end