Sha256: 12dba70f707fc2b231b70aefe06c9143520ad256ac61758fdb7e3221224c403f

Contents?: true

Size: 546 Bytes

Versions: 4

Compression:

Stored size: 546 Bytes

Contents

module Tr3llo
  module Command
    module Label
      module Add
        extend self

        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
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
3llo-1.3.1 lib/3llo/command/label/add.rb
3llo-1.3.1.pre.rc.0 lib/3llo/command/label/add.rb
3llo-1.2.0 lib/3llo/command/label/add.rb
3llo-1.1.0 lib/3llo/command/label/add.rb