Method: SentryApi::ObjectifiedHash#initialize

Defined in:
lib/sentry-api/objectified_hash.rb

#initialize(hash) ⇒ ObjectifiedHash

Creates a new ObjectifiedHash object.



5
6
7
8
9
10
11
12
# File 'lib/sentry-api/objectified_hash.rb', line 5

def initialize(hash)
  @hash = hash
  @data = hash.inject({}) do |data, (key, value)|
    value = ObjectifiedHash.new(value) if value.is_a? Hash
    data[key.to_s] = value
    data
  end
end