module Tr3llo::Command::List::ArchiveCards
Public Instance Methods
execute(key)
click to toggle source
# File lib/3llo/command/list/archive_cards.rb, line 7 def execute(key) list_id = Entities.parse_id(:list, key) interface = Application.fetch_interface!() interface.print_frame do is_approved = interface.input.yes?("Are you sure you want to archive all cards?") if is_approved archive_cards(list_id) interface.puts("All cards on the list have been archived.") end end end
Private Instance Methods
archive_cards(list_id)
click to toggle source
# File lib/3llo/command/list/archive_cards.rb, line 23 def archive_cards(list_id) API::List.archive_cards(list_id) end
interface()
click to toggle source
# File lib/3llo/command/list/archive_cards.rb, line 27 def interface Application.fetch_interface!() end