Module: OodCluster::JsonSerializer::ClassMethods
- Defined in:
- lib/ood_cluster/json_serializer.rb
Overview
Namespace for class methods that extend object
Instance Method Summary collapse
-
#json_create(object) ⇒ self
Initialize object with data attribute hash.
Instance Method Details
#json_create(object) ⇒ self
Initialize object with data attribute hash
16 17 18 |
# File 'lib/ood_cluster/json_serializer.rb', line 16 def json_create(object) new object["data"].each_with_object({}) { |(k, v), h| h[k.to_sym] = v } end |