Sha256: 3325df501ce324f32f4b12fcb4c99b10450d4a2fee0194afe56de25c6323e012

Contents?: true

Size: 357 Bytes

Versions: 4

Compression:

Stored size: 357 Bytes

Contents

module CC
  module Analyzer
    module IssueValidations
      class TypeValidation < Validation
        def valid?
          type && type.casecmp("issue").zero?
        end

        def message
          "Type must be 'issue' but was '#{type}'"
        end

        private

        def type
          object["type"]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
codeclimate-0.36.0 lib/cc/analyzer/issue_validations/type_validation.rb
codeclimate-0.35.2 lib/cc/analyzer/issue_validations/type_validation.rb
codeclimate-0.35.1 lib/cc/analyzer/issue_validations/type_validation.rb
codeclimate-0.35.0 lib/cc/analyzer/issue_validations/type_validation.rb