Sha256: 06aad99ef95085ef2e1090e968f38ad2861817c108d2f4b1a5e0dda070df11d1
Contents?: true
Size: 593 Bytes
Versions: 1
Compression:
Stored size: 593 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) # rubocop:disable Metrics/CyclomaticComplexity 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
humidifier-4.1.1 | lib/humidifier/serializer.rb |