Sha256: ccc24e6cc803ea95c27dd38e91a43a7f3ac39a9868fdd4bf0e7cfeb14b4216bd

Contents?: true

Size: 300 Bytes

Versions: 22

Compression:

Stored size: 300 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'
require 'set'

Array.class_eval do
  # @return [String]
  def to_or_sentence
    to_sentence(two_words_connector: ' or ', last_word_connector: ', or ')
  end
end

Set.class_eval do
  extend Forwardable

  def_delegators :to_a, :to_or_sentence
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
ruby-rails-extensions-2.1.1 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.14 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.13 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.12 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.11 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.10 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.9 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.8 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.7 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.6 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.5 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.4 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.3 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.2 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.1.0.pre.rc.1 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.0.1 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.0.1.pre.rc.1 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.0.0 lib/ruby-rails-extensions/extensions/to_or_sentence.rb
ruby-rails-extensions-2.0.0.pre.rc.1 lib/ruby-rails-extensions/extensions/to_or_sentence.rb