Class: SmartCore::Types::Primitive::NilableValidator::Result Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/types/primitive/nilable_validator/result.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0

Constant Summary collapse

NO_INVARIANT_ERRORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Array)

Since:

  • 0.2.0

[].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, checked_value) ⇒ void

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.

Parameters:

Since:

  • 0.2.0



31
32
33
34
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 31

def initialize(type, checked_value)
  @type = type
  @checked_value = checked_value
end

Instance Attribute Details

#checked_valueAny (readonly) Also known as: value

Returns:

  • (Any)

Since:

  • 0.2.0



22
23
24
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 22

def checked_value
  @checked_value
end

#typeSmartCore::Types::Primitive (readonly)

Returns:

Since:

  • 0.2.0



16
17
18
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 16

def type
  @type
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)

Since:

  • 0.2.0



75
76
77
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 75

def failure?
  false
end

#invariant_errorsArray Also known as: errors, error_codes

Returns:

  • (Array)

Since:

  • 0.2.0



49
50
51
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 49

def invariant_errors
  NO_INVARIANT_ERRORS
end

#is_valid_checkBoolean Also known as: valid_check?

Returns:

  • (Boolean)

Since:

  • 0.2.0



40
41
42
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 40

def is_valid_check
  true
end

#success?Boolean

Returns:

  • (Boolean)

Since:

  • 0.2.0



67
68
69
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 67

def success?
  true
end

#valid_invariants?Boolean

Returns:

  • (Boolean)

Since:

  • 0.2.0



59
60
61
# File 'lib/smart_core/types/primitive/nilable_validator/result.rb', line 59

def valid_invariants?
  true
end