Sha256: 6f3c90a7005d968c9545780834d11e5d87828538d4343872aae3cb1bc076c719
Contents?: true
Size: 893 Bytes
Versions: 69
Compression:
Stored size: 893 Bytes
Contents
module Fog module AWS module Parsers module Lambda class Base def process(body) body.inject({}) { |h, (k, v)| h[k] = rules(k, v); h } end private def rules(key, value) case value when Hash process(value) when Array value.map { |i| process(i) } else case key when 'LastModified' Time.parse(value) when 'Policy', 'Statement' begin Fog::JSON.decode(value) rescue Fog::JSON::DecodeError => e Fog::Logger.warning("Error parsing response json - #{e}") {} end else value end end end end end end end end
Version data entries
69 entries across 67 versions & 3 rubygems