Class: RightAws::AcfInterface::AcfOriginAccesIdentitiesListParser

Inherits:
RightAWSParser
  • Object
show all
Defined in:
lib/acf/right_acf_origin_access_identities.rb

Overview


PARSERS:

Constant Summary

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

#full_tag_name, #result, #tag, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAWSParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from RightAws::RightAWSParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser

Instance Method Details

#resetObject

:nodoc:



198
199
200
# File 'lib/acf/right_acf_origin_access_identities.rb', line 198

def reset
  @result = { :origin_access_identities => [] }
end

#tagend(name) ⇒ Object



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/acf/right_acf_origin_access_identities.rb', line 209

def tagend(name)
  case name
  when 'Marker'            then @result[:marker]       = @text
  when 'NextMarker'        then @result[:next_marker]  = @text
  when 'MaxItems'          then @result[:max_items]    = @text.to_i
  when 'IsTruncated'       then @result[:is_truncated] = (@text == 'true')
  when 'Id'                then @item[:aws_id]               = @text
  when 'S3CanonicalUserId' then @item[:s3_canonical_user_id] = @text
  when 'CallerReference'   then @item[:caller_reference]     = @text
  when 'Comment'           then @item[:comment]              = AwsUtils::xml_unescape(@text)
  end
  case full_tag_name
  when %r{CloudFrontOriginAccessIdentitySummary$},
       %r{^CloudFrontOriginAccessIdentity$},
       %r{^CloudFrontOriginAccessIdentityConfig$}
    @result[:origin_access_identities] << @item
  end
end

#tagstart(name, attributes) ⇒ Object



201
202
203
204
205
206
207
208
# File 'lib/acf/right_acf_origin_access_identities.rb', line 201

def tagstart(name, attributes)
  case full_tag_name
  when %r{CloudFrontOriginAccessIdentitySummary$},
       %r{^CloudFrontOriginAccessIdentity$},
       %r{^CloudFrontOriginAccessIdentityConfig$}
    @item = {}
  end
end