Class: CC::Config::Validation::FileValidator
- Inherits:
-
Object
- Object
- CC::Config::Validation::FileValidator
- Includes:
- HashValidations
- Defined in:
- lib/cc/config/validation/file_validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(path, registry) ⇒ FileValidator
constructor
A new instance of FileValidator.
- #valid? ⇒ Boolean
Methods included from HashValidations
#key_type_error_message, #validate_hash_data, #validate_key_type, #warn_unrecognized_keys
Constructor Details
#initialize(path, registry) ⇒ FileValidator
Returns a new instance of FileValidator.
9 10 11 12 13 14 15 16 17 |
# File 'lib/cc/config/validation/file_validator.rb', line 9 def initialize(path, registry) @path = path @registry = registry @errors = [] @warnings = [] validate end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/cc/config/validation/file_validator.rb', line 7 def errors @errors end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/cc/config/validation/file_validator.rb', line 7 def path @path end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
7 8 9 |
# File 'lib/cc/config/validation/file_validator.rb', line 7 def warnings @warnings end |
Instance Method Details
#valid? ⇒ Boolean
19 20 21 |
# File 'lib/cc/config/validation/file_validator.rb', line 19 def valid? errors.none? end |