Class: Burstflow::Workflow::Configuration::JSONBWithIndifferentAccess

Inherits:
Object
  • Object
show all
Defined in:
lib/burstflow/workflow/configuration.rb

Class Method Summary collapse

Class Method Details

.dump(hash) ⇒ Object



8
9
10
# File 'lib/burstflow/workflow/configuration.rb', line 8

def self.dump(hash)
  hash.as_json
end

.load(hash) ⇒ Object



12
13
14
15
16
# File 'lib/burstflow/workflow/configuration.rb', line 12

def self.load(hash)
  hash ||= {}
  hash = JSON.parse(hash) if hash.is_a? String
  hash.with_indifferent_access
end