Parent

Array

Public Instance Methods

deep_convert_keys(█) click to toggle source

Applies deep_convert_keys to each element which responds to deep_convert_keys

# File lib/netzke/core_ext/array.rb, line 12
def deep_convert_keys(&block)
  block_given? ? self.map do |i|
    i.respond_to?('deep_convert_keys') ? i.deep_convert_keys(&block) : i
  end : self
end
deep_each_pair(█) click to toggle source
# File lib/netzke/core_ext/array.rb, line 18
def deep_each_pair(&block)
  self.each{ |el| el.respond_to?('deep_each_pair') && el.deep_each_pair(&block) }
end
deep_freeze() click to toggle source
# File lib/netzke/core_ext/array.rb, line 26
def deep_freeze
  each { |j| j.deep_freeze if j.respond_to? :deep_freeze }
  freeze
end
jsonify() click to toggle source
# File lib/netzke/core_ext/array.rb, line 2
def jsonify
  self.map{ |el| el.instance_of?(Array) || el.instance_of?(Hash) ? el.jsonify : el }
end
recursive_delete_if_nil() click to toggle source
# File lib/netzke/core_ext/array.rb, line 22
def recursive_delete_if_nil
  self.map{|el| el.respond_to?('recursive_delete_if_nil') ? el.recursive_delete_if_nil : el}
end
to_nifty_json() click to toggle source

Camelizes the keys of hashes and converts them to JSON

# File lib/netzke/core_ext/array.rb, line 7
def to_nifty_json
  self.recursive_delete_if_nil.jsonify.to_json
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.