Sha256: 77980b4e8f4a21da3bf18976a2700831906f03fbfaa4fd5a87503f08f073c391
Contents?: true
Size: 546 Bytes
Versions: 12
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true module Humidifier # Dumps an object to CFN syntax class Serializer class << self # dumps the given object out to CFN syntax recursively def dump(node) case node when Hash then node.map { |key, value| [key, dump(value)] }.to_h when Array then node.map { |value| dump(value) } when Ref, Fn then dump(node.to_cf) when Date then node.iso8601 when Time then node.to_datetime.iso8601 else node end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems