Class: Mockingjay::Deserialize
- Inherits:
-
Object
- Object
- Mockingjay::Deserialize
- Defined in:
- lib/mockingjay/deserialize.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(raw_data) ⇒ Deserialize
constructor
Takes in a JSON string, and creates a new hash full of data.
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/mockingjay/deserialize.rb', line 3 def data @data end |