Class: Emfrp::SSymbol
Instance Method Summary
collapse
Methods inherited from Syntax
#[], #deep_copy, #initialize, #traverse_all_syntax
Constructor Details
This class inherits a constructor from Emfrp::Syntax
Instance Method Details
#==(other) ⇒ Object
73
74
75
76
77
78
79
|
# File 'lib/emfrp/syntax.rb', line 73
def ==(other)
if other.is_a?(SSymbol)
self[:desc] == other[:desc]
else
super
end
end
|
#eql?(other) ⇒ Boolean
85
86
87
88
89
90
91
|
# File 'lib/emfrp/syntax.rb', line 85
def eql?(other)
if other.is_a?(SSymbol)
self.hash == other.hash
else
super
end
end
|
#hash ⇒ Object
81
82
83
|
# File 'lib/emfrp/syntax.rb', line 81
def hash
self[:desc].hash
end
|
#pretty_print(q) ⇒ Object
93
94
95
|
# File 'lib/emfrp/syntax.rb', line 93
def pretty_print(q)
q.text 'SSymbol(' + self[:desc] + ')'
end
|