Sha256: 1588a8832ac4402f2abf002ce84a75b8f2463996af4b937678696d27be276f73
Contents?: true
Size: 365 Bytes
Versions: 145
Compression:
Stored size: 365 Bytes
Contents
# frozen_string_literal: true module Motor class HashSerializer def self.dump(hash) hash.to_json end def self.load(hash) return hash unless hash hash = JSON.parse(hash.presence || '{}') if hash.is_a?(String) if hash.is_a?(Hash) hash.with_indifferent_access else hash || {} end end end end
Version data entries
145 entries across 145 versions & 1 rubygems