module Tr3llo::Command::Label::Add

Public Instance Methods

execute(board_id) click to toggle source
# File lib/3llo/command/label/add.rb, line 7
def execute(board_id)
  interface = Application.fetch_interface!()

  interface.print_frame do
    name = interface.input.ask("Name:", required: true)
    color = interface.input.select("Choose the color:", Utils::TRELLO_LABEL_COLOR)

    API::Label.create(name: name, color: color, board_id: board_id)

    interface.puts("Label has been created.")
  end
end