Project

General

Profile

Bug #4834 ยป 0001-adding-documentation-for-current_group-and-fill_brea.patch

ysiadf (Ysiad Ferreiras), 06/06/2011 11:34 AM

View differences:

lib/prettyprint.rb
attr_reader :output, :maxwidth, :newline, :genspace
attr_reader :indent, :group_queue
# current_group returns the group most recently added to the stack.
def current_group
@group_stack.last
end
......
current_group.first?
end
# break_outmost_groups breaks the buffer into
# lines that are shorter than the maxwidth specified
# in this instance.
def break_outmost_groups
while @maxwidth < @output_width + @buffer_width
return unless group = @group_queue.deq
......
end
end
# fill_breakable is a convenience method for breakable.
# It is identical to calling breakable with the same parameters.
def fill_breakable(sep=' ', width=sep.length)
group { breakable sep, width }
end
    (1-1/1)