Sha256: f30751d97385bcdc0b3a33b605e165fe3c7e59eb39b347d8b34dac4c30e9d5cf

Contents?: true

Size: 601 Bytes

Versions: 97

Compression:

Stored size: 601 Bytes

Contents

module CC
  class Config
    module Validation
      class CheckValidator
        include HashValidations

        attr_reader :errors, :warnings

        def initialize(data)
          @data = data

          @errors = []
          @warnings = []

          validate
        end

        private

        attr_reader :data

        def validate
          unless data.is_a?(Hash)
            errors << "must be a hash"
            return
          end

          validate_key_type("enabled", [TrueClass, FalseClass])
          validate_key_type("config", Hash)
        end
      end
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
codeclimate-fede-0.85.38 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.37 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.36 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.35 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.33 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.32 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.31 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.30 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.21 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.24 lib/cc/config/validation/check_validator.rb
codeclimate-fede-0.85.23 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.23 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.22 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.21 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.19 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.18 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.17 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.15 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.14 lib/cc/config/validation/check_validator.rb
codeclimate-0.85.13 lib/cc/config/validation/check_validator.rb