Class: Burst::WorkflowHelper::JSONBWithIndifferentAccess
- Inherits:
-
Object
- Object
- Burst::WorkflowHelper::JSONBWithIndifferentAccess
- Defined in:
- lib/burst/workflow_helper.rb
Class Method Summary collapse
Class Method Details
.dump(hash) ⇒ Object
7 8 9 |
# File 'lib/burst/workflow_helper.rb', line 7 def self.dump(hash) hash.as_json end |
.load(hash) ⇒ Object
11 12 13 14 15 |
# File 'lib/burst/workflow_helper.rb', line 11 def self.load(hash) hash ||= {} hash = JSON.parse(hash) if hash.is_a? String hash.with_indifferent_access end |