module Tr3llo::Command::Card::AddItem
Public Instance Methods
execute(checklist_key)
click to toggle source
# File lib/3llo/command/card/add_item.rb, line 7 def execute(checklist_key) checklist_id = Entities.parse_id(:checklist, checklist_key) interface = Application.fetch_interface!() interface.print_frame do name = interface.input.ask("Item name:", required: true) API::Checklist.create_item(checklist_id, name) interface.puts("Item #{name.inspect} has been added") end end