Class: Interdependence::Types::UnsetType

Inherits:
Object
  • Object
show all
Defined in:
lib/interdependence/types.rb

Overview

Unset type abstraction

Direct Known Subclasses

UnsetField, UnsetOptions

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ TrueClass, FalseClass Also known as: eql?

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.

Check if other class is the same unset type and is also unset

Parameters:

  • other (AbstractUnset)
    descendant of AbstractUnset

Returns:

  • (TrueClass, FalseClass)

    outcome



26
27
28
# File 'lib/interdependence/types.rb', line 26

def ==(other)
  other.instance_of?(self.class) && other.unset?
end

#unset?TrueClass

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.

This method is abstract.

Unset type class

Always return true for unset? on an unset type

Returns:

  • (TrueClass)


14
15
16
# File 'lib/interdependence/types.rb', line 14

def unset?
  true
end