Sha256: ae642c28397d02248e243b435cc2135d52147d82213f76b2c4f29589b30d313c

Contents?: true

Size: 909 Bytes

Versions: 16

Compression:

Stored size: 909 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module IAM
        class PolicyVersion < Fog::Parsers::Base
          def reset
            super
            @version = {}
            @response = { 'PolicyVersion' => @version }
          end

          def end_element(name)
            case name
            when 'RequestId'
              @response[name] = value
            when 'VersionId'
              @version[name] = value
            when 'IsDefaultVersion'
              @version[name] = (value == 'true')
            when 'Document'
              @version[name] = if decoded_string = URI.decode_www_form_component(value)
                                 Fog::JSON.decode(decoded_string) rescue value
                               else
                                 value
                               end
            end
            super
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.28.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.27.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.26.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.25.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.24.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.23.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.22.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.21.1 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.21.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.20.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.19.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.18.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.17.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.16.0 lib/fog/aws/parsers/iam/policy_version.rb
fog-aws-3.15.0 lib/fog/aws/parsers/iam/policy_version.rb