Class: Mockingjay::Deserialize

Inherits:
Object
  • Object
show all
Defined in:
lib/mockingjay/deserialize.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_data) ⇒ Deserialize

Takes in a JSON string, and creates a new hash full of data



6
7
8
# File 'lib/mockingjay/deserialize.rb', line 6

def initialize(raw_data)
  @data = reduce_hash(JSON.parse(raw_data))
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/mockingjay/deserialize.rb', line 3

def data
  @data
end