method
to_sentence
to_sentence(words=[])
public
Hide source
# File lib/spec/matchers/pretty.rb, line 8 def to_sentence(words=[]) words = words.map{|w| w.inspect} case words.length when 0 "" when 1 " #{words[0]}" when 2 " #{words[0]} and #{words[1]}" else " #{words[0...-1].join(', ')}, and #{words[-1]}" end end