Sha256: 2d6fa182b37422aa1d22b4261a95e27386d38cd61e9f90ac5a972c1fa2a30374

Contents?: true

Size: 738 Bytes

Versions: 7

Compression:

Stored size: 738 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module IAM

        class ListGroupsForUser < Fog::Parsers::Base

          def reset
            @group_for_user = {}
            @response = { 'GroupsForUser' => [] }
          end

          def end_element(name)
            case name
            when 'Path', 'GroupName', 'GroupId', 'Arn'
              @group_for_user[name] = @value
            when 'member'
              @response['GroupsForUser'] << @group_for_user
              @group_for_user = {}
            when 'IsTruncated'
              response[name] = (@value == 'true')
            when 'Marker', 'RequestId'
              response[name] = @value
            end
          end

        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.7.2 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.7.1 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.7.0 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.6.0 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.5.3 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.5.2 lib/fog/aws/parsers/iam/list_groups_for_user.rb
fog-0.5.1 lib/fog/aws/parsers/iam/list_groups_for_user.rb