Sha256: d3a4e79c4af04057381616db1b8bfcbc97605ad337dc81d25ab728d02b221d55

Contents?: true

Size: 1.31 KB

Versions: 37

Compression:

Stored size: 1.31 KB

Contents

module Fog
  module Parsers
    module AWS
      module Compute
        class DescribeVpcAttribute < Fog::Parsers::Base
          def reset
            @response                = { }
            @in_enable_dns_support   = false
            @in_enable_dns_hostnames = false
          end

          def start_element(name, attrs = [])
            super
            case name
            when 'enableDnsSupport'
              @in_enable_dns_support   = true
            when 'enableDnsHostnames'
              @in_enable_dns_hostnames = true
            end
          end

          def end_element(name)
            if @in_enable_dns_support
              case name
              when 'value'
                @response['enableDnsSupport'] = (value == 'true')
              when 'enableDnsSupport'
                @in_enable_dns_support = false
              end
            elsif @in_enable_dns_hostnames
              case name
              when 'value'
                @response['enableDnsHostnames'] = (value == 'true')
              when 'enableDnsHostnames'
                @in_enable_dns_hostnames = false
              end
            else
              case name
              when 'requestId', 'vpcId'
                @response[name] = value
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.29.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.28.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.27.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.26.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.25.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.24.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.23.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.22.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.21.1 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.21.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.20.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.19.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.18.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.17.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.16.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.15.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.14.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.13.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
fog-aws-3.12.0 lib/fog/aws/parsers/compute/describe_vpc_attribute.rb