Class: Fog::Parsers::Storage::AWS::AccessControlList
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::Storage::AWS::AccessControlList
show all
- Defined in:
- lib/fog/aws/parsers/storage/access_control_list.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from Base
#attr_value, #characters, #end_element_namespace, #initialize, #start_element_namespace, #value
Instance Method Details
#end_element(name) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/fog/aws/parsers/storage/access_control_list.rb', line 21
def end_element(name)
case name
when 'AccessControlList'
@in_access_control_list = false
when 'Grant'
@response['AccessControlList'] << @grant
@grant = { 'Grantee' => {} }
when 'DisplayName', 'ID'
if @in_access_control_list
@grant['Grantee'][name] = value
else
@response['Owner'][name] = value
end
when 'Permission'
@grant[name] = value
when 'URI'
@grant['Grantee'][name] = value
end
end
|
#reset ⇒ Object
8
9
10
11
12
|
# File 'lib/fog/aws/parsers/storage/access_control_list.rb', line 8
def reset
@in_access_control_list = false
@grant = { 'Grantee' => {} }
@response = { 'Owner' => {}, 'AccessControlList' => [] }
end
|
#start_element(name, attrs = []) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/fog/aws/parsers/storage/access_control_list.rb', line 14
def start_element(name, attrs = [])
super
if name == 'AccessControlList'
@in_access_control_list = true
end
end
|