Sha256: c1fd95bb685d234f7e5ccb7c4d5a371698ea0d50febb91a0d48ecce8f6015d4a

Contents?: true

Size: 519 Bytes

Versions: 6

Compression:

Stored size: 519 Bytes

Contents

module Tr3llo
  module Command
    module Card
      module AddChecklist
        extend self

        def execute(card_key)
          card_id = Entities.parse_id(:card, card_key)
          interface = Application.fetch_interface!()

          interface.print_frame do
            name = interface.input.ask("Checklist name:", required: true)

            API::Checklist.create(card_id, name: name)

            interface.puts("Item #{name.inspect} has been added")
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
3llo-1.3.1 lib/3llo/command/card/add_checklist.rb
3llo-1.3.1.pre.rc.0 lib/3llo/command/card/add_checklist.rb
3llo-1.2.0 lib/3llo/command/card/add_checklist.rb
3llo-1.1.0 lib/3llo/command/card/add_checklist.rb
3llo-1.0.0 lib/3llo/command/card/add_checklist.rb
3llo-1.0.0.pre.rc.0 lib/3llo/command/card/add_checklist.rb