==(other)
click to toggle source
def ==(other)
other.is_a?(Variable) && other.name == name
end
eql?(other)
click to toggle source
free_variables(set = Set.new)
click to toggle source
def free_variables(set = Set.new)
set.tap do
set << name
end
end
hash()
click to toggle source
def hash
self.class.hash ^ name.hash
end
sub(s)
click to toggle source
def sub(s)
s.apply(self)
end
to_json(*a)
click to toggle source
def to_json(*a)
{ class: :variable, name: name, location: location }.to_json(*a)
end
to_s(level = 0)
click to toggle source
def to_s(level = 0)
name.to_s
end