Class: Elparser::SExpSymbol
- Inherits:
-
AbstractSExpAtom
- Object
- AbstractSExp
- AbstractSExpAtom
- Elparser::SExpSymbol
- Defined in:
- lib/elparser.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ SExpSymbol
constructor
A new instance of SExpSymbol.
- #to_ruby ⇒ Object
- #to_s ⇒ Object
Methods inherited from AbstractSExpAtom
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
50 51 52 |
# File 'lib/elparser.rb', line 50 def name @name end |
Instance Method Details
#to_ruby ⇒ Object
57 58 59 |
# File 'lib/elparser.rb', line 57 def to_ruby @name.to_sym end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/elparser.rb', line 54 def to_s @name end |