Class: Steep::AST::Types::Name::Singleton
Instance Attribute Summary
Attributes inherited from Base
#name
Instance Method Summary
collapse
#each_child, #map_type
Methods inherited from Base
#initialize, #level, #map_type, #subst
#free_variables
Instance Method Details
#==(other) ⇒ Object
Also known as:
eql?
96
97
98
99
|
# File 'lib/steep/ast/types/name.rb', line 96
def ==(other)
other.class == self.class &&
other.name == name
end
|
103
104
105
|
# File 'lib/steep/ast/types/name.rb', line 103
def hash
self.class.hash ^ name.hash
end
|
107
108
109
|
# File 'lib/steep/ast/types/name.rb', line 107
def to_s
"singleton(#{name.to_s})"
end
|