Sha256: 8039f22e815c57c6e6e02b1c3a507bc92b21e11fe0eac178ef3b60eaffeb1bb2

Contents?: true

Size: 657 Bytes

Versions: 23

Compression:

Stored size: 657 Bytes

Contents

module Fog
  module Parsers
    module DNS
      module Zerigo

        class FindHosts < Fog::Parsers::Base

          def reset
            @host = {}
            @response = { 'hosts' => [] }
          end

          def end_element(name)
            case name
            when 'id', 'priority', 'ttl', 'zone-id'
              @host[name] = value.to_i
            when 'data', 'fqdn', 'host-type', 'hostname', 'notes', 'zone-id', 'created-at', 'updated-at'
              @host[name] = value
            when 'host'
              @response['hosts'] << @host
              @host = {}
            end
          end

        end

      end
    end
  end
end

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
fog-1.1.2 lib/fog/zerigo/parsers/dns/find_hosts.rb
fog_tractical-1.1.4 lib/fog/zerigo/parsers/dns/find_hosts.rb
fog_tractical-1.1.3 lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
fog-1.1.1 lib/fog/zerigo/parsers/dns/find_hosts.rb
fog-1.1.0 lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
tag-fog-1.0.1 lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/parsers/dns/find_hosts.rb
fog-1.0.0 lib/fog/zerigo/parsers/dns/find_hosts.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/dns/parsers/zerigo/find_hosts.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/dns/parsers/zerigo/find_hosts.rb
fog-0.11.0 lib/fog/dns/parsers/zerigo/find_hosts.rb
fog-0.10.0 lib/fog/dns/parsers/zerigo/find_hosts.rb