Sha256: a7542f98b91a4e229d9d4e53121013de4550e85bc3a63237994d0369149f37d2

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

module Domain
  ##
  # Represents the Checkstyle
  # @param [Array] of bad files
  class Checkstyle
    attr_reader :bad_files

    def initialize(bad_files)
      @bad_files = bad_files
    end

    ##
    # A good checkstyle means no errors.
    #
    def good?
      @bad_files.nil? || @bad_files.empty?
    end

    ##
    # Factory for Checkstyle without errors
    def self.good
      Domain::Checkstyle.new(nil)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
java-checkstyle-precommit-1.0.0 lib/plugins/pre_commit/domain/checkstyle.rb