Class: Carioca::Services::Validator

Inherits:
Object
  • Object
show all
Includes:
Constants
Defined in:
lib/carioca/validator.rb

Constant Summary

Constants included from Constants

Constants::BUILTINS, Constants::DEFAULT_COLORS_STATUS, Constants::DEFAULT_CONFIG_FILE, Constants::DEFAULT_CONFIG_ROOT, Constants::DEFAULT_DEBUGGER_TRACER, Constants::DEFAULT_EMOJI_STATUS, Constants::DEFAULT_ENVIRONMENT, Constants::DEFAULT_ENVIRONMENTS_LIST, Constants::DEFAULT_LOCALE, Constants::DEFAULT_LOG_LEVEL, Constants::DEFAULT_MASTER_KEY_FILE, Constants::DEFAULT_OUTPUT_MODE, Constants::DEFAULT_OUTPUT_TARGET, Constants::DEFAULT_REGISTRY_FILE, Constants::DEFAULT_SECURE_STORE_FILE, Constants::DEFAULT_USER_CONFIG_PATH, Constants::SERVICES_FULL_LIST_SPECS, Constants::SERVICES_MANDATORY_SPECS, Constants::SERVICES_SPECS_DETAIL

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition:, service:) ⇒ Validator

Returns a new instance of Validator.



10
11
12
13
# File 'lib/carioca/validator.rb', line 10

def initialize(definition:, service:)
  @definition = definition
  @service = service
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



6
7
8
# File 'lib/carioca/validator.rb', line 6

def definition
  @definition
end

Instance Method Details

#validate!Object



15
16
17
18
19
20
# File 'lib/carioca/validator.rb', line 15

def validate!
  validate_mandatories
  validate_full_and_type
  validate_not_builtins
  fill_content
end