Sha256: ea3d81e6d960c8a6bc32d1fdc4d5c9a341be0a8769e4f08e6c553353a263f529

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

module Troo
  module CLI
    class Default < ThorFixes
      package_name "default"

      desc "board <board_id>", "Set the board <board_id> to default."
      def board(board_id)
        if board = Troo::BoardRetrieval.retrieve(board_id)
          SetDefault.for(board)
          say "Board '#{board.name}' set to default."
        else
          say "Board cannot be found."
        end
      end

      desc "card <card_id>", "Set the card <card_id> to default."
      def card(card_id)
        if card = Troo::CardRetrieval.retrieve(card_id)
          SetDefault.for(card)
          say "Card '#{card.name}' set to default."
        else
          say "Card cannot be found."
        end
      end

      desc "list <list_id>", "Set the list <list_id> to default."
      def list(list_id)
        if list = Troo::ListRetrieval.retrieve(list_id)
          SetDefault.for(list)
          say "List '#{list.name}' set to default."
        else
          say "List cannot be found."
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
troo-0.0.3 lib/troo/cli/default_cli.rb
troo-0.0.2 lib/troo/cli/default_cli.rb