Sha256: f480c3ae89b1568fd91871c5906793b47381cf92603aea7371d2d210c4f25296

Contents?: true

Size: 593 Bytes

Versions: 115

Compression:

Stored size: 593 Bytes

Contents

# encoding: utf-8
require 'open_classes/object'
require 'open_classes/module'
require 'open_classes/array/together_helper'

# Array
class Array
  include TogetherHelper

  # Arrays bulk concat.
  #
  # together_concat has alias :tconcat
  #
  #   alpha = %w{one two three}
  #   numbers = %w{1 2 3}
  #   [alpha, numbers].together do |first, second|
  #     print "#{first}:#{second}\n"  # => output one:1, two:2, three:3
  #   end
  def together_concat(other)
    if_not_contain_array_rails_type_error
    each { |list|list.concat other }
  end

  alias_method :tconcat, :together_concat
end

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.131 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.130 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.129 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.128 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.127 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.126 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.125 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.124 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.123 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.122 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.121 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.120 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.119 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.118 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.117 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.116 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.115 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.114 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.113 lib/open_classes/array/together_concat.rb
tbpgr_utils-0.0.112 lib/open_classes/array/together_concat.rb