Sha256: 68098934449b7d135c91d216f6d64e0d3b812ea0ce391644db60d015f569a0f8

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 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(&:clear)
  end

  alias_method :tclear, :together_clear
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.151 lib/open_classes/array/together_clear.rb