Class: Elparser::SExpSymbol

Inherits:
AbstractSExpAtom show all
Defined in:
lib/elparser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractSExpAtom

#atom?

Methods inherited from AbstractSExp

#==, #atom?, #cons?, #list?, #visit

Constructor Details

#initialize(name) ⇒ SExpSymbol

Returns a new instance of SExpSymbol.



51
52
53
# File 'lib/elparser.rb', line 51

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



50
51
52
# File 'lib/elparser.rb', line 50

def name
  @name
end

Instance Method Details

#to_rubyObject



57
58
59
# File 'lib/elparser.rb', line 57

def to_ruby
  @name.to_sym
end

#to_sObject



54
55
56
# File 'lib/elparser.rb', line 54

def to_s
  @name
end