Class: Module::NegativeType

Inherits:
CompositeType show all
Defined in:
lib/composite_type.rb

Constant Summary

Constants inherited from CompositeType

CompositeType::CACHE, CompositeType::CACHE_MUTEX

Instance Attribute Summary

Attributes inherited from CompositeType

#_t

Instance Method Summary collapse

Methods inherited from CompositeType

#initialize, #name, new_cached

Methods inherited from Module

#&, #of, #with, #|, #~@

Constructor Details

This class inherits a constructor from Module::CompositeType

Instance Method Details

#===(x) ⇒ Object



110
111
112
# File 'lib/composite_type.rb', line 110

def === x
   ! (@_t[0] === x)
end

#to_sObject



113
114
115
# File 'lib/composite_type.rb', line 113

def to_s
  @to_s ||= "(~#{@_t[0]})".freeze
end