class NRSER::Types::Is
Type
satisfied only by it's exact {#value} object (identity comparison via `#equal?`).
Attributes
value[R]
The exact value for this type.
@return [Object]
Public Class Methods
new(value, **options)
click to toggle source
Calls superclass method
# File lib/nrser/types/is.rb, line 31 def initialize value, **options super **options @value = value end
Public Instance Methods
==(other)
click to toggle source
# File lib/nrser/types/is.rb, line 44 def == other equal?(other) || ( self.class.equal?( other.class ) && @value.equal?( other.value ) ) end
default_symbolic()
click to toggle source
# File lib/nrser/types/is.rb, line 51 def default_symbolic "{#{ value.inspect }}" end
explain()
click to toggle source
# File lib/nrser/types/is.rb, line 36 def explain "Is<#{ value.inspect }>" end
test?(value)
click to toggle source
# File lib/nrser/types/is.rb, line 40 def test? value @value.equal? value end