Sha256: df87fc07309de308a28e1db5dae02be535b921895b2d233fc071445d5e3bf2e9

Contents?: true

Size: 509 Bytes

Versions: 2

Compression:

Stored size: 509 Bytes

Contents

module ScrumLint

  class ContextChecker

    def self.call(board)
      new.(board)
    end

    def call(board)
      board.task_lists.each do |list|
        cards = cards_without_context(list)
        if cards.any?
          puts "List #{list.name.green} has cards missing context:"
          cards.each { |card| puts "-> #{card.name.blue}" }
        end
      end
    end

  private

    def cards_without_context(list)
      list.cards.select { |card| !card.desc.match(/^Context:/) }
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scrum_lint-0.0.2 lib/scrum_lint/checkers/context_checker.rb
scrum_lint-0.0.1 lib/scrum_lint/checkers/context_checker.rb