class T::Types::SelfType

Modeling self-types properly at runtime would require additional tracking, so at runtime we permit all values and rely on the static checker.

Public Class Methods

new() click to toggle source
# File lib/types/types/self_type.rb, line 9
def initialize(); end

Public Instance Methods

name() click to toggle source

@override Base

# File lib/types/types/self_type.rb, line 12
def name
  "T.self_type"
end
valid?(obj) click to toggle source

@override Base

# File lib/types/types/self_type.rb, line 17
def valid?(obj)
  true
end

Private Instance Methods

subtype_of_single?(other) click to toggle source

@override Base

# File lib/types/types/self_type.rb, line 22
        def subtype_of_single?(other)
  case other
  when SelfType
    true
  else
    false
  end
end