Sha256: 63a902c30e54aca5c0af0be45d3f61bf26ad97ac65dd0da3623c60dea7703952

Contents?: true

Size: 533 Bytes

Versions: 6

Compression:

Stored size: 533 Bytes

Contents

module Tr3llo
  module Command
    module Card
      module AddItem
        extend self

        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
      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_item.rb
3llo-1.3.1.pre.rc.0 lib/3llo/command/card/add_item.rb
3llo-1.2.0 lib/3llo/command/card/add_item.rb
3llo-1.1.0 lib/3llo/command/card/add_item.rb
3llo-1.0.0 lib/3llo/command/card/add_item.rb
3llo-1.0.0.pre.rc.0 lib/3llo/command/card/add_item.rb