Sha256: 4773422fab123057c6fdd9c448ceae54810af1fa327cf61a71db9a9a7687c133
Contents?: true
Size: 224 Bytes
Versions: 16
Compression:
Stored size: 224 Bytes
Contents
class Hash def to_o JSON.parse to_json, object_class: OpenStruct end def to_os self.each_with_object(OpenStruct.new) do |(key, val), memo| memo[key] = val.is_a?(Hash) ? val.to_os : val end end end
Version data entries
16 entries across 16 versions & 1 rubygems