Sha256: 1c7c5084ec51e78b6ce1d13ada05bbc38d4ac9d3e09d1a0f5cfd335220dd0e58

Contents?: true

Size: 396 Bytes

Versions: 41

Compression:

Stored size: 396 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

41 entries across 41 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 lib/extensions/array.rb
alchemy_cms-2.0.7 lib/extensions/array.rb
alchemy_cms-2.1.11 lib/extensions/array.rb
alchemy_cms-2.1.9.1 lib/extensions/array.rb
alchemy_cms-2.1.9 lib/extensions/array.rb
alchemy_cms-2.1.8.1 lib/extensions/array.rb
alchemy_cms-2.1.8 lib/extensions/array.rb
alchemy_cms-2.1.7 lib/extensions/array.rb
alchemy_cms-2.1.6 lib/extensions/array.rb
alchemy_cms-2.1.5 lib/extensions/array.rb
alchemy_cms-2.1.4 lib/extensions/array.rb
alchemy_cms-2.1.3 lib/extensions/array.rb
alchemy_cms-2.1.2 lib/extensions/array.rb
alchemy_cms-2.1.1 lib/extensions/array.rb
alchemy_cms-2.1 lib/extensions/array.rb
alchemy_cms-2.1.rc6 lib/extensions/array.rb
alchemy_cms-2.1.rc5 lib/extensions/array.rb
alchemy_cms-2.1.rc4 lib/extensions/array.rb
alchemy_cms-2.1.rc3 lib/extensions/array.rb
alchemy_cms-2.1.rc2 lib/extensions/array.rb