Flowdock
method

to_sentence

Importance_0
to_sentence(words) public

No documentation

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

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
Register or log in to add new notes.