Sha256: 966ac35383a8290c4a4122779054e23c7bc03db6ac61527b44a981bcbada2dde

Contents?: true

Size: 488 Bytes

Versions: 7

Compression:

Stored size: 488 Bytes

Contents

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

module Fog
  module DNS
    class Slicehost

      class Zones < Fog::Collection

        model Fog::DNS::Slicehost::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 Excon::Errors::Forbidden
          nil
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/dns/models/slicehost/zones.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/dns/models/slicehost/zones.rb
fog-0.11.0 lib/fog/dns/models/slicehost/zones.rb
fog-0.10.0 lib/fog/dns/models/slicehost/zones.rb
fog4encbs-0.9.0.1 lib/fog/dns/models/slicehost/zones.rb
fog4encbs-0.9.0 lib/fog/dns/models/slicehost/zones.rb
fog-0.9.0 lib/fog/dns/models/slicehost/zones.rb