instance_type(*args)
click to toggle source
def instance_type(*args)
Types::ClassInstance.new(name: name, args: args, location: nil)
end
instance_type?(type)
click to toggle source
def instance_type?(type)
type.is_a?(Types::ClassInstance) && type.name == name
end
singleton_type()
click to toggle source
def singleton_type
@singleton_type ||= Types::ClassSingleton.new(name: name, location: nil)
end
singleton_type?(type)
click to toggle source
def singleton_type?(type)
type.is_a?(Types::ClassSingleton) && type.name == name
end
to_s()
click to toggle source