Sha256: b95b121ff4023c76e00411f5c2c1c2f8c5f38655a1e97698454c8f2193f4a8ee

Contents?: true

Size: 188 Bytes

Versions: 8

Compression:

Stored size: 188 Bytes

Contents

class Hash
  def nested_keys
    keys = []
    self.each do |key, value|
      keys << key
      if value.is_a?(Hash)
        keys += value.nested_keys
      end
    end
    keys
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bootstripe-0.2.11 lib/bootstripe/hash_additions.rb
bootstripe-0.2.10 lib/bootstripe/hash_additions.rb
bootstripe-0.2.9 lib/bootstripe/hash_additions.rb
bootstripe-0.2.8 lib/bootstripe/hash_additions.rb
bootstripe-0.2.7 lib/bootstripe/hash_additions.rb
bootstripe-0.2.6 lib/bootstripe/hash_additions.rb
bootstripe-0.2.5 lib/bootstripe/hash_additions.rb
bootstripe-0.2.4 lib/bootstripe/hash_additions.rb