Sha256: 1aaf4e5424d71a5ba93f0e0a806f0f24d60dedb20a862155cf255d2fd7d98a70

Contents?: true

Size: 703 Bytes

Versions: 7

Compression:

Stored size: 703 Bytes

Contents

require 'fog/core/collection'
require 'fog/dns/models/dnsmadeeasy/record'

module Fog
  module DNS
    class DNSMadeEasy

      class Records < Fog::Collection

        attribute :zone

        model Fog::DNS::DNSMadeEasy::Record

        def all
          requires :zone
          data = connection.list_records(zone.identity).body
          load(data)
        end

        def get(record_id)
          data = connection.get_record(zone.identity, record_id).body
          new(data)
        rescue Fog::Service::NotFound
          nil
        end

        def new(attributes = {})
          requires :zone
          super({ :zone => zone }.merge!(attributes))
        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/dnsmadeeasy/records.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/dns/models/dnsmadeeasy/records.rb
fog-0.11.0 lib/fog/dns/models/dnsmadeeasy/records.rb
fog-0.10.0 lib/fog/dns/models/dnsmadeeasy/records.rb
fog4encbs-0.9.0.1 lib/fog/dns/models/dnsmadeeasy/records.rb
fog4encbs-0.9.0 lib/fog/dns/models/dnsmadeeasy/records.rb
fog-0.9.0 lib/fog/dns/models/dnsmadeeasy/records.rb