class Eucalyptus::Response

Public Class Methods

new(hash) click to toggle source

extend OpenStruct to work with nested hashes

# File lib/eucalyptus/response.rb, line 4
def initialize(hash)
  @table = {}
  @hash_table = {}

  hash.each do |k, v|
    @table[k.to_sym] = (v.is_a?(Hash) ? self.class.new(v) : v)
    @hash_table[k.to_sym] = v

    new_ostruct_member(k)
  end
end