lib/fog/dynect/models/dns/records.rb in fog-1.22.0 vs lib/fog/dynect/models/dns/records.rb in fog-1.22.1

- old
+ new

@@ -2,13 +2,11 @@ require 'fog/dynect/models/dns/record' module Fog module DNS class Dynect - class Records < Fog::Collection - attribute :zone model Fog::DNS::Dynect::Record def all(options = {}) @@ -37,11 +35,11 @@ def get(record_id) requires :zone list = service.get_all_records(zone.domain, {}).body['data'] - url = list.detect { |e| e =~ /\/#{record_id}$/ } + url = list.find { |e| e =~ /\/#{record_id}$/ } return unless url (_, _, t, _, fqdn, id) = url.split('/') type = t.gsub(/Record$/, '') record = service.get_record(type, zone.domain, fqdn, 'record_id' => id).body['data'] @@ -55,11 +53,9 @@ def new(attributes = {}) requires :zone super({:zone => zone}.merge!(attributes)) end - end - end end end