Class: Fog::Parsers::Redshift::AWS::ClusterSubnetGroupParser
- Inherits:
-
Base
- Object
- Base
- Fog::Parsers::Redshift::AWS::ClusterSubnetGroupParser
- Defined in:
- lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb
Instance Method Summary collapse
- #end_element(name) ⇒ Object
- #fresh_subnet ⇒ Object
-
#reset ⇒ Object
:cluster_subnet_group_name - (String) :description - (String) :vpc_id - (String) :subnet_group_status - (String) :subnets - (Array) :subnet_identifier - (String) :subnet_availability_zone - (Hash) :name - (String) :subnet_status - (String).
- #start_element(name, attrs = []) ⇒ Object
Instance Method Details
#end_element(name) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb', line 32 def end_element(name) super case name when 'ClusterSubnetGroupName', 'Desciption', 'VpcId', 'SubnetGroupStatus' @response[name] = value when 'SubnetIdentifier', 'SubnetStatus' @subnet[name] = value when 'Name' @subnet['SubnetAvailabilityZone'][name] = value when 'Subnet' @response['Subnets'] << {name => @subnet} @subnet = fresh_subnet end end |
#fresh_subnet ⇒ Object
20 21 22 |
# File 'lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb', line 20 def fresh_subnet {'SubnetAvailabilityZone'=>{}} end |
#reset ⇒ Object
16 17 18 |
# File 'lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb', line 16 def reset @response = { 'Subnets' => [] } end |
#start_element(name, attrs = []) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb', line 24 def start_element(name, attrs = []) super case name when 'Subnets' @subnet = fresh_subnet end end |