Object
# File rbs-2.0.0/lib/rbs/types.rb, line 143
def self.build(v)
case v
when Symbol
new(name: v, location: nil)
when Array
v.map {|x| new(name: x, location: nil) }
end
end
# File rbs-2.0.0/lib/rbs/types.rb, line 119
def ==(other)
other.is_a?(Variable) && other.name == name
end
# File rbs-2.0.0/lib/rbs/types.rb, line 129
def free_variables(set = Set.new)
set.tap do
set << name
end
end
# File rbs-2.0.0/lib/rbs/types.rb, line 125
def hash
self.class.hash ^ name.hash
end
# File rbs-2.0.0/lib/rbs/types.rb, line 139
def sub(s)
s.apply(self)
end