Class: LightService::Context::ReservedKeysViaOrganizerVerifier
- Inherits:
-
ReservedKeysVerifier
- Object
- KeyVerifier
- ReservedKeysVerifier
- LightService::Context::ReservedKeysViaOrganizerVerifier
- Defined in:
- lib/light-service/context/key_verifier.rb
Instance Attribute Summary
Attributes inherited from KeyVerifier
Instance Method Summary collapse
- #error_message ⇒ Object
-
#initialize(context_data) ⇒ ReservedKeysViaOrganizerVerifier
constructor
rubocop:disable Lint/MissingSuper.
-
#violated_keys ⇒ Object
rubocop:enable Lint/MissingSuper.
Methods inherited from ReservedKeysVerifier
#error_to_throw, #keys, #reserved_keys, #throw_error_predicate
Methods inherited from KeyVerifier
#are_all_keys_in_context?, #format_keys, #keys_not_found, #throw_error_predicate, #verify, verify_keys
Constructor Details
#initialize(context_data) ⇒ ReservedKeysViaOrganizerVerifier
rubocop:disable Lint/MissingSuper
120 121 122 |
# File 'lib/light-service/context/key_verifier.rb', line 120 def initialize(context_data) @context = LightService::Context.make(context_data) end |
Instance Method Details
#error_message ⇒ Object
129 130 131 132 133 134 |
# File 'lib/light-service/context/key_verifier.rb', line 129 def " reserved keys cannot be added to the context\n reserved key: [\#{format_keys(violated_keys)}]\n ERR\nend\n" |
#violated_keys ⇒ Object
rubocop:enable Lint/MissingSuper
125 126 127 |
# File 'lib/light-service/context/key_verifier.rb', line 125 def violated_keys context.keys.map(&:to_sym) & reserved_keys end |