Sha256: 052a6ea8f94df23613685c1556c84aa3ada18f226ba757246ae3456ba0621f4a

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

module Fog
  module Parsers
    module Bluebox
      module DNS

        class GetZones < Fog::Parsers::Base

          def reset
            @zone = {}
            @response = { 'zones' => [] }
          end

          def end_element(name)
            case name
            when 'serial', 'ttl', 'retry', 'expires', 'record-count', 'refresh', 'minimum'
              @zone[name] = @value.to_i
            when 'name', 'id'
              @zone[name] = @value
            when 'record'
              @response['zones'] << @zone
              @zone = {}
            end
          end

        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-0.7.2 lib/fog/dns/parsers/bluebox/get_zones.rb
fog-0.7.1 lib/fog/dns/parsers/bluebox/get_zones.rb
fog-0.7.0 lib/fog/dns/parsers/bluebox/get_zones.rb
fog-0.6.0 lib/fog/dns/parsers/bluebox/get_zones.rb