Class | PrettyPrint::SingleLine |
In: |
prettyprint.rb
|
Parent: | Object |
# File prettyprint.rb, line 363 def initialize(output, maxwidth=nil, newline=nil) @output = output @first = [true] end
# File prettyprint.rb, line 380 def group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) @first.push true @output << open_obj yield @output << close_obj @first.pop end