List all domains @param [Hash] options Options to pass to the underlying API call @option options [String] :fqdn search for the given fqdn
# File lib/fog/zerigo/models/dns/records.rb, line 17 def all(options = {}) requires :zone if options[:fqdn] hosts = service.find_hosts(options[:fqdn], zone.id).body['hosts'] load(hosts) else parent = zone.collection.get(zone.identity) if parent merge_attributes(parent.records.attributes) load(parent.records.map {|record| record.attributes}) else nil end end end
# File lib/fog/zerigo/models/dns/records.rb, line 33 def get(record_id) data = service.get_host(record_id).body new(data) rescue Fog::Service::NotFound nil end
# File lib/fog/zerigo/models/dns/records.rb, line 40 def new(attributes = {}) requires :zone super({ :zone => zone }.merge!(attributes)) end