Class: Pangea::Internal::Type::Unknown Abstract Private

Inherits:
Object
  • Object
show all
Extended by:
Converter
Defined in:
lib/pangea/internal/type/unknown.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.

This class is abstract.

Class Method Summary collapse

Methods included from Converter

coerce, dump, dump, type_info

Class Method Details

.==(other) ⇒ Boolean

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:

  • other (Object)

Returns:



26
# File 'lib/pangea/internal/type/unknown.rb', line 26

def self.==(other) = other.is_a?(Class) && other <= Pangea::Internal::Type::Unknown

.===(other) ⇒ Boolean

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:

  • other (Object)

Returns:



19
# File 'lib/pangea/internal/type/unknown.rb', line 19

def self.===(other) = true

.coerce(value, state:) ⇒ 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.

Parameters:

  • value (Object)
  • state (Hash{Symbol=>Object})

    .

    @option state [Boolean, :strong] :strictness

    @option state [HashSymbol=>Object] :exactness

    @option state [Integer] :branched

Returns:

  • (Object)


42
43
44
45
# File 'lib/pangea/internal/type/unknown.rb', line 42

def coerce(value, state:)
  state.fetch(:exactness)[:yes] += 1
  value
end