Class: JSI::Validation::Result::Valid
- Inherits:
-
JSI::Validation::Result
- Object
- JSI::Validation::Result
- JSI::Validation::Result::Valid
- Defined in:
- lib/jsi/validation/result.rb,
lib/jsi/validation/result.rb
Overview
A result indicating validation success of an instance against a schema
Instance Attribute Summary collapse
- #evaluated_tokens ⇒ Set readonly
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize ⇒ Valid
constructor
A new instance of Valid.
- #jsi_fingerprint ⇒ Object private
- #valid? ⇒ Boolean
Methods inherited from JSI::Validation::Result
Constructor Details
#initialize ⇒ Valid
Returns a new instance of Valid.
204 205 206 |
# File 'lib/jsi/validation/result.rb', line 204 def initialize @evaluated_tokens = Set.new end |
Instance Attribute Details
#evaluated_tokens ⇒ Set (readonly)
209 210 211 |
# File 'lib/jsi/validation/result.rb', line 209 def evaluated_tokens @evaluated_tokens end |
Instance Method Details
#freeze ⇒ Object
215 216 217 218 |
# File 'lib/jsi/validation/result.rb', line 215 def freeze @evaluated_tokens.freeze super end |
#jsi_fingerprint ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
222 223 224 225 226 227 |
# File 'lib/jsi/validation/result.rb', line 222 def jsi_fingerprint { class: self.class, evaluated_tokens: evaluated_tokens, }.freeze end |
#valid? ⇒ Boolean
211 212 213 |
# File 'lib/jsi/validation/result.rb', line 211 def valid? true end |