Method: Wordlist::ListMethods#concat

Defined in:
lib/wordlist/list_methods.rb

#concat(other) ⇒ Operators::Concat Also known as: +

Lazily enumerates over the first wordlist, then the second.

Examples:

wordlist1 = Wordlist::Words["foo", "bar", "baz"]
wordlist2 = Wordlist::Words["abc", "xyz"]
(wordlist1 + wordlist2).each do |word|
  puts word
end
# foo
# bar
# baz
# abc
# xyz

Parameters:

  • other (Enumerable)

    The other wordlist to concat.

Returns:

Since:

  • 1.0.0



39
40
41
# File 'lib/wordlist/list_methods.rb', line 39

def concat(other)
  Operators::Concat.new(self,other)
end