class Elparser::SExpCons
Attributes
car[R]
cdr[R]
Public Class Methods
new(car, cdr)
click to toggle source
# File lib/elparser.rb, line 121 def initialize(car, cdr) @car = car @cdr = cdr end
Public Instance Methods
to_ruby()
click to toggle source
# File lib/elparser.rb, line 136 def to_ruby [@car.to_ruby, @cdr.to_ruby] end
to_s()
click to toggle source
# File lib/elparser.rb, line 129 def to_s if @cdr.class == SExpList then "(#{@car} "+@cdr.list.map{|i| i.to_s }.join(" ")+")" else "(#{@car} . #{@cdr})" end end
visit() { |car| ... }
click to toggle source
# File lib/elparser.rb, line 125 def visit @car = yield @car @cdr = yield @cdr end