data.rb
# This is just pretty-printing for debugging
This is just pretty-printing for debugging
This is just pretty - printing for debugging
def inspect
    output = ""
    output += "#{@name.symbol}"
    @@indentation += 1
    if @arguments and @arguments.length > 0
      output += "("
      first = true
      arguments.each do |a|
        if first
          first = false
        else
          output += ", "
        end
        output += a.inspect
      end
      output += ")"
    end
    if @block and @block.forest.length > 0
      output += " {\n"
      @block.forest.each do |b|
        output += indentation
        output += b.inspect
      end
      @@indentation -= 1
      output += "\n#{indentation}}"
    else
      @@indentation -= 1
    end
    output
  end
def inspect output = "" output += "#{@name.symbol}" @@indentation += 1 if @arguments and @arguments . length > 0 output += "(" first = true arguments . each do | a | if first first = false else output += ", " end output += a . inspect end output += ")" end if @block and @block . forest . length > 0 output += " {\n" @block . forest . each do | b | output += indentation output += b . inspect end @@indentation -= 1 output += "\n#{indentation}}" else @@indentation -= 1 end output end
This is just pretty-printing for debugging
This is just pretty - printing for debugging