provider/core.rb
# TODO(nelsonjr): Make format2 into format and fix all references throughout
# the code base.
Make format2 into format and fix all references throughout
the code base.
Make format2 into format and fix all references throughout the code base .
def format2(sources, overrides = {})
      options = DEFAULT_FORMAT_OPTIONS.merge(overrides)
      output = ''
      avail_columns = options[:max_columns] - options[:start_indent]
      sources.each do |attempt|
        output = indent(attempt, options[:indent])
        return output if format_fits?(output, options[:start_indent],
                                      options[:max_columns])
      end
      unless options[:on_misfit].nil?
        (alt_fit, alt_output) = options[:on_misfit].call(sources, output,
                                                         options, avail_columns)
        return alt_output if alt_fit
      end
      fail_and_log_format_error output, options, avail_columns \
        unless options[:quiet]
    end
def format2 ( sources , overrides = { } ) options = DEFAULT_FORMAT_OPTIONS . merge ( overrides ) output = '' avail_columns = options [ :max_columns ] - options [ :start_indent ] sources . each do | attempt | output = indent ( attempt , options [ :indent ] ) return output if format_fits? ( output , options [ :start_indent ] , options [ :max_columns ] ) end unless options [ :on_misfit ] . nil? ( alt_fit , alt_output ) = options [ :on_misfit ] . call ( sources , output , options , avail_columns ) return alt_output if alt_fit end fail_and_log_format_error output , options , avail_columns unless options [ :quiet ] end
TODO(nelsonjr): Make format2 into format and fix all references throughout
the code base.
TODO ( nelsonjr ) : Make format2 into format and fix all references throughout the code base .
sources
<not_specific>
overrides
<not_specific>