mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[dns|dnsimple] use load for collection #all
This commit is contained in:
parent
33744c6da7
commit
b461fb05ba
2 changed files with 4 additions and 4 deletions
|
@ -14,8 +14,8 @@ module Fog
|
|||
def all
|
||||
requires :zone
|
||||
clear
|
||||
data = connection.list_records(zone.id).body
|
||||
data.each {|object| self << new(object["record"]) }
|
||||
data = connection.list_records(zone.id).body.map {|record| record['record']}
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(record_id)
|
||||
|
|
|
@ -11,8 +11,8 @@ module Fog
|
|||
|
||||
def all
|
||||
clear
|
||||
data = connection.list_domains.body
|
||||
data.each {|object| self << new(object["domain"]) }
|
||||
data = connection.list_domains.body.map {|zone| zone['domain']}
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(zone_id)
|
||||
|
|
Loading…
Reference in a new issue