Class: Nendo::LispKeyword

Inherits:
Object
  • Object
show all
Defined in:
lib/nendo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject (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_sObject



198
199
200
# File 'lib/nendo.rb', line 198

def to_s
  self.key.to_s
end