Sha256: b757883fd792187e7b8e81b3e43dd0e6b1e758ee5a40f87a34815d198b25bde9
Contents?: true
Size: 723 Bytes
Versions: 25
Compression:
Stored size: 723 Bytes
Contents
require 'fog/core/collection' require 'fog/slicehost/models/dns/record' module Fog module DNS class Slicehost class Records < Fog::Collection attribute :zone model Fog::DNS::Slicehost::Record def all requires :zone data = connection.get_records.body['records'] load(data).reject {|record| record.zone_id != zone.id} end def get(record_id) data = connection.get_record(record_id).body new(data) rescue Excon::Errors::Forbidden nil end def new(attributes = {}) requires :zone super({ :zone => zone }.merge!(attributes)) end end end end end
Version data entries
25 entries across 25 versions & 7 rubygems