class Hash

Public Instance Methods

to_struct() click to toggle source
# File lib/awspec/ext/hash.rb, line 4
def to_struct
  st = Struct.new(*keys)
  maps = values.map do |s|
    next s.to_struct if s.is_a?(Hash)

    s
  end
  st.new(*maps)
end