Class: Fog::Parsers::AWS::IAM::ListServerCertificates

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

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



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

def end_element(name)
  case name
  when 'Arn', 'Path', 'ServerCertificateId', 'ServerCertificateName'
    @certificate[name] = value
  when 'UploadDate'
    @certificate[name] = Time.parse(value)
  when 'member'
    @response['Certificates'] << @certificate
    reset_certificate
  when 'IsTrunctated'
    @response[name] = !!value
  when 'Marker'
    @response[name] = value
  end
end

#resetObject



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

def reset
  @response = { 'Certificates' => [] }
  reset_certificate
end

#reset_certificateObject



11
12
13
# File 'lib/fog/aws/parsers/iam/list_server_certificates.rb', line 11

def reset_certificate
  @certificate = {}
end