In: |
prettyprint.rb
|
Parent: | Object |
# File prettyprint.rb, line 593 def initialize(string, *children) @string = string @children = children end
# File prettyprint.rb, line 598 def show(pp) pp.group { pp.text @string pp.nest(@string.length) { unless @children.empty? pp.text '[' pp.nest(1) { first = true @children.each {|t| if first first = false else pp.text ',' pp.breakable end t.show(pp) } } pp.text ']' end } } end