Sha256: ea344462576a3824a66ac710d6a34b5c0479994d1d9add08dbd57e04913aa62d

Contents?: true

Size: 480 Bytes

Versions: 7

Compression:

Stored size: 480 Bytes

Contents

require 'fog/core/collection'
require 'fog/dns/models/bluebox/zone'

module Fog
  module Bluebox
    class DNS

      class Zones < Fog::Collection

        model Fog::Bluebox::DNS::Zone

        def all
          data = connection.get_zones.body['zones']
          load(data)
        end

        def get(zone_id)
          data = connection.get_zone(zone_id).body
          new(data)
        rescue Fog::Service::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/dns/models/bluebox/zones.rb
fog-0.8.1 lib/fog/dns/models/bluebox/zones.rb
fog-0.8.0 lib/fog/dns/models/bluebox/zones.rb
fog-0.7.2 lib/fog/dns/models/bluebox/zones.rb
fog-0.7.1 lib/fog/dns/models/bluebox/zones.rb
fog-0.7.0 lib/fog/dns/models/bluebox/zones.rb
fog-0.6.0 lib/fog/dns/models/bluebox/zones.rb