0001-adding-documentation-for-current_group-and-fill_brea.patch

Ysiad Ferreiras, 06/06/2011 11:34 AM

Download (1.28 KB)

View differences:

lib/prettyprint.rb
93 93
  attr_reader :output, :maxwidth, :newline, :genspace
94 94
  attr_reader :indent, :group_queue
95 95

  
96
  # current_group returns the group most recently added to the stack.
96 97
  def current_group
97 98
    @group_stack.last
98 99
  end
......
119 120
    current_group.first?
120 121
  end
121 122

  
123
  # break_outmost_groups breaks the buffer into
124
  # lines that are shorter than the maxwidth specified
125
  # in this instance.
122 126
  def break_outmost_groups
123 127
    while @maxwidth < @output_width + @buffer_width
124 128
      return unless group = @group_queue.deq
......
155 159
    end
156 160
  end
157 161

  
162
  # fill_breakable is a convenience method for breakable.
163
  # It is identical to calling breakable with the same parameters.
158 164
  def fill_breakable(sep=' ', width=sep.length)
159 165
    group { breakable sep, width }
160 166
  end
161
-