class T::Nilable

Attributes

type[R]

Public Class Methods

new(type) click to toggle source
# File lib/emery/type.rb, line 19
def initialize(type)
  @type = type
end

Public Instance Methods

==(other) click to toggle source
# File lib/emery/type.rb, line 30
def ==(other)
  T.instance_of?(Nilable, other) and self.type == other.type
end
check(value) click to toggle source
# File lib/emery/type.rb, line 25
def check(value)
  if value != nil
    T.check(type, value)
  end
end
to_s() click to toggle source
# File lib/emery/type.rb, line 22
def to_s
  "Nilable[#{type.to_s}]"
end