class DeepOpenStruct

Converts the nested hashes to open structs too

Constants

VERSION

Public Class Methods

new(hash) click to toggle source
Calls superclass method
# File lib/deep_open_struct.rb, line 8
def initialize(hash)
  super(hash.each_with_object({}) { |(k, v), h| h[k] = v.is_a?(Hash) ? self.class.new(v) : v })
end