Class: JSI::Validation::ValidityResult

Inherits:
Result
  • Object
show all
Defined in:
lib/jsi/validation/result.rb

Overview

a result indicating only whether an instance is valid against its schemas

Instance Method Summary collapse

Methods inherited from Result

#builder

Constructor Details

#initialize(valid) ⇒ ValidityResult

Returns a new instance of ValidityResult.



194
195
196
# File 'lib/jsi/validation/result.rb', line 194

def initialize(valid)
  @valid = valid
end

Instance Method Details

#jsi_fingerprintObject

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.

see Util::Private::FingerprintHash



204
205
206
207
208
209
# File 'lib/jsi/validation/result.rb', line 204

def jsi_fingerprint
  {
    class: self.class,
    valid: valid?,
  }
end

#valid?Boolean

Returns:

  • (Boolean)


198
199
200
# File 'lib/jsi/validation/result.rb', line 198

def valid?
  @valid
end