Class: Fog::Parsers::AWS::Storage::GetBucketNotification
- Inherits:
-
Base
- Object
- Base
- Fog::Parsers::AWS::Storage::GetBucketNotification
- Defined in:
- lib/fog/aws/parsers/storage/get_bucket_notification.rb
Instance Method Summary collapse
Instance Method Details
#end_element(name) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fog/aws/parsers/storage/get_bucket_notification.rb', line 29 def end_element(name) case @configuration when 'topic' case name when 'Id', 'Event', 'Topic' @topic[name] = value when 'TopicConfiguration' @response['Topics'] << @topic @topic = {} end when 'queue' case name when 'Id', 'Queue', 'Event' @queue[name] = value when 'QueueConfiguration' @response['Queues'] << @queue @queue = {} end when 'func' case name when 'Id', 'CloudFunction', 'InvocationRule', 'Event' @func[name] = value when 'CloudFunctionConfiguration' @response['CloudFunctions'] << @func @func = {} end end end |
#reset ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/aws/parsers/storage/get_bucket_notification.rb', line 6 def reset @func = {} @queue = {} @topic = {} @response = { 'Topics' => [], 'Queues' => [], 'CloudFunctions' => [] } end |
#start_element(name, attrs = []) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/aws/parsers/storage/get_bucket_notification.rb', line 17 def start_element(name, attrs = []) super case name when 'TopicConfiguration' @configuration = 'topic' when 'QueueConfiguration' @configuration = 'queue' when 'CloudFunctionConfiguration' @configuration = 'func' end end |