Sha256: 0a0754f7374bbc03f2489edfe52e48b06900857aabc1cbe662b7b3ed7492a537

Contents?: true

Size: 615 Bytes

Versions: 6

Compression:

Stored size: 615 Bytes

Contents

module Tr3llo
  module Command
    module Card
      module EditChecklist
        extend self

        def execute(checklist_key)
          checklist_id = Entities.parse_id(:checklist, checklist_key)
          checklist = API::Checklist.get(checklist_id)

          interface = Application.fetch_interface!()

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

            API::Checklist.update(checklist_id, name: name)

            interface.puts("Checklist has been updated")
          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/edit_checklist.rb
3llo-1.3.1.pre.rc.0 lib/3llo/command/card/edit_checklist.rb
3llo-1.2.0 lib/3llo/command/card/edit_checklist.rb
3llo-1.1.0 lib/3llo/command/card/edit_checklist.rb
3llo-1.0.0 lib/3llo/command/card/edit_checklist.rb
3llo-1.0.0.pre.rc.0 lib/3llo/command/card/edit_checklist.rb