method
_pretty_print
1.1.12 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Include
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
_pretty_print(array)
private
Hide source
# File lib/spec/matchers/include.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