Class: Qonfig::Validation::Validators::Basic Private

Inherits:
Object
  • Object
show all
Defined in:
lib/qonfig/validation/validators/basic.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.20.0

Direct Known Subclasses

MethodBased, Predefined, ProcBased

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(setting_key_matcher, strict) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Since:

  • 0.20.0



24
25
26
27
# File 'lib/qonfig/validation/validators/basic.rb', line 24

def initialize(setting_key_matcher, strict)
  @setting_key_matcher = setting_key_matcher
  @strict = strict
end

Instance Attribute Details

#setting_key_matcherString, ... (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String, Symbol, NilClass)

Since:

  • 0.20.0



10
11
12
# File 'lib/qonfig/validation/validators/basic.rb', line 10

def setting_key_matcher
  @setting_key_matcher
end

#strictBoolean (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Since:

  • 0.20.0



16
17
18
# File 'lib/qonfig/validation/validators/basic.rb', line 16

def strict
  @strict
end

Instance Method Details

#validate(data_set) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Returns:

  • (Boolean)

Since:

  • 0.20.0



34
35
36
# File 'lib/qonfig/validation/validators/basic.rb', line 34

def validate(data_set)
  setting_key_provided? ? validate_concrete(data_set) : validate_full(data_set)
end