Method: Enumerable#including

Defined in:
activesupport/lib/active_support/core_ext/enumerable.rb

#including(*elements) ⇒ Object

Returns a new array that includes the passed elements.

[ 1, 2, 3 ].including(4, 5)
# => [ 1, 2, 3, 4, 5 ]

["David", "Rafael"].including %w[ Aaron Todd ]
# => ["David", "Rafael", "Aaron", "Todd"]


112
113
114
# File 'activesupport/lib/active_support/core_ext/enumerable.rb', line 112

def including(*elements)
  to_a.including(*elements)
end