Class: Textus::Doctor::Validator
- Inherits:
-
Object
- Object
- Textus::Doctor::Validator
- Defined in:
- lib/textus/doctor/validator.rb
Instance Method Summary collapse
- #call(container:, call:) ⇒ Object
-
#initialize(reader:, manifest:, audit_log:, schema_for:) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(reader:, manifest:, audit_log:, schema_for:) ⇒ Validator
Returns a new instance of Validator.
6 7 8 9 10 11 |
# File 'lib/textus/doctor/validator.rb', line 6 def initialize(reader:, manifest:, audit_log:, schema_for:) @reader = reader @manifest = manifest @audit_log = audit_log @schema_for = schema_for end |
Instance Method Details
#call(container:, call:) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/textus/doctor/validator.rb', line 13 def call(container:, call:) @container = container @call = call violations = [] check_content_violations(violations) (violations) { "protocol" => Textus::PROTOCOL, "ok" => violations.empty?, "violations" => violations } end |