Class: Nendo::LispKeyword
- Inherits:
-
Object
- Object
- Nendo::LispKeyword
- Defined in:
- lib/nendo.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #===(other) ⇒ Object
-
#initialize(str) ⇒ LispKeyword
constructor
A new instance of LispKeyword.
- #to_s ⇒ Object
Constructor Details
#initialize(str) ⇒ LispKeyword
Returns a new instance of LispKeyword.
182 183 184 |
# File 'lib/nendo.rb', line 182 def initialize( str ) @key = str.intern end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
202 203 204 |
# File 'lib/nendo.rb', line 202 def key @key end |
Instance Method Details
#==(other) ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/nendo.rb', line 186 def ==(other) if other.is_a? LispKeyword self.key == other.key else false end end |
#===(other) ⇒ Object
194 195 196 |
# File 'lib/nendo.rb', line 194 def ===(other) self.==(other) end |
#to_s ⇒ Object
198 199 200 |
# File 'lib/nendo.rb', line 198 def to_s self.key.to_s end |