Sha256: 6f47249a4cf73367f33d0fa9b1ab34638bab44a207887e45a77ec5bc8121eebd

Contents?: true

Size: 390 Bytes

Versions: 43

Compression:

Stored size: 390 Bytes

Contents

Array.class_eval do

  def stringify
    map do |value|
      if value.is_a?(Hash) || value.is_a?(Array)
        value.stringify
      else
        value.to_s
      end
    end
  end

  def stringify!
    a = []
    each do |value|
      if value.is_a?(Hash) || value.is_a?(Array)
        a << value.stringify!
      else
        a << value.to_s
      end
    end
    replace(a)
  end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
alchemy_cms-2.6.3 lib/extensions/array.rb
alchemy_cms-2.6.2.1 lib/extensions/array.rb
alchemy_cms-2.6.2 lib/extensions/array.rb
alchemy_cms-2.6.1 lib/extensions/array.rb
alchemy_cms-2.6.0 lib/extensions/array.rb
alchemy_cms-2.6.0.rc5 lib/extensions/array.rb
alchemy_cms-2.5.3.1 lib/extensions/array.rb
alchemy_cms-2.5.3 lib/extensions/array.rb
alchemy_cms-2.5.2.2 lib/extensions/array.rb
alchemy_cms-2.5.2.1 lib/extensions/array.rb
alchemy_cms-2.5.2 lib/extensions/array.rb
alchemy_cms-2.5.1 lib/extensions/array.rb
alchemy_cms-2.5.0 lib/extensions/array.rb
alchemy_cms-2.5.0.rc3 lib/extensions/array.rb
alchemy_cms-2.5.0.b9 lib/extensions/array.rb
alchemy_cms-2.3.2 lib/extensions/array.rb
alchemy_cms-2.2.4 lib/extensions/array.rb
alchemy_cms-2.4.1 lib/extensions/array.rb
alchemy_cms-2.5.0.b5 lib/extensions/array.rb
alchemy_cms-2.5.0.b2 lib/extensions/array.rb