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