Sha256: 408777e7edd2ac6d0df1ed68efca3e7c997581db1b3bd5f24abb980ba5852ca2

Contents?: true

Size: 526 Bytes

Versions: 114

Compression:

Stored size: 526 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 clear.
  #
  # together_clear has alias :tclear
  #
  # same elements size case
  #   alpha = %w{one two three}
  #   numbers = %w{1 2 3}
  #   [alpha, numbers].together_clear # => output [[],[]]
  def together_clear
    if_not_contain_array_rails_type_error
    each { |list|list.clear }
  end

  alias_method :tclear, :together_clear
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.50 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.49 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.48 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.47 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.46 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.45 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.44 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.43 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.42 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.41 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.40 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.39 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.38 lib/open_classes/array/together_clear.rb
tbpgr_utils-0.0.37 lib/open_classes/array/together_clear.rb