Class: Fog::Parsers::AWS::IAM::PolicyVersion

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/iam/policy_version.rb

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fog/aws/parsers/iam/policy_version.rb', line 12

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(value)
                       Fog::JSON.decode(decoded_string) rescue value
                     else
                       value
                     end
  end
  super
end

#resetObject



6
7
8
9
10
# File 'lib/fog/aws/parsers/iam/policy_version.rb', line 6

def reset
  super
  @version = {}
  @response = { 'PolicyVersion' => @version }
end