Class: Rosette::Core::Validators::SerializerValidator
- Defined in:
- lib/rosette/core/validators/serializer_validator.rb
Overview
Validates a serializer by making sure the given repo has been configured to support it.
Instance Attribute Summary
Attributes inherited from Validator
Instance Method Summary collapse
-
#valid?(serializer_id, repo_name, configuration) ⇒ Boolean
Returns true if the serializer is valid, false otherwise.
Methods inherited from Validator
Constructor Details
This class inherits a constructor from Rosette::Core::Validators::Validator
Instance Method Details
#valid?(serializer_id, repo_name, configuration) ⇒ Boolean
Returns true if the serializer is valid, false otherwise.
24 25 26 27 28 29 30 31 32 |
# File 'lib/rosette/core/validators/serializer_validator.rb', line 24 def valid?(serializer_id, repo_name, configuration) repo = configuration.get_repo(repo_name) if repo.get_serializer_config(serializer_id) true else << "Unable to find serializer '#{serializer_id}'." false end end |