method

_pretty_print

Importance_0
1.1.12 - Show latest stable - 0 notes - Class: Spec::Matchers::MatchArray
_pretty_print(array) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/matchers/match_array.rb, line 45
        def _pretty_print(array)
          result = ""
          array.each_with_index do |item, index|
            if index < (array.length - 2)
              result << "#{item.inspect}, "
            elsif index < (array.length - 1)
              result << "#{item.inspect} and "
            else
              result << "#{item.inspect}"
            end
          end
          result
        end
Register or log in to add new notes.