Method: Gitlab::Sentence#to_exclusive_sentence

Defined in:
lib/gitlab/sentence.rb

#to_exclusive_sentence(array) ⇒ Object

Wraps ActiveSupport’s Array#to_sentence to convert the given array to a comma-separated sentence joined with localized ‘or’ Strings instead of ‘and’.



8
9
10
# File 'lib/gitlab/sentence.rb', line 8

def to_exclusive_sentence(array)
  array.to_sentence(two_words_connector: _(' or '), last_word_connector: _(', or '))
end