class Fog::DNS::Google::Changes

Public Instance Methods

all() click to toggle source

Enumerates the list of Changes

@return [Array<Fog::DNS::Google::Change>] List of Changes resources

# File lib/fog/dns/google/models/changes.rb, line 13
def all
  requires :zone

  data = service.list_changes(zone.identity).body["changes"] || []
  load(data)
rescue Fog::Errors::NotFound
  []
end
get(identity) click to toggle source

Fetches the representation of an existing Change

@param [String] identity Change identity @return [Fog::DNS::Google::Change] Change resource

# File lib/fog/dns/google/models/changes.rb, line 27
def get(identity)
  requires :zone

  if change = service.get_change(zone.identity, identity).body
    new(change)
  end
rescue Fog::Errors::NotFound
  nil
end
new(attributes = {}) click to toggle source

Creates a new instance of a Change

@return [Fog::DNS::Google::Change] Change resource

Calls superclass method
# File lib/fog/dns/google/models/changes.rb, line 41
def new(attributes = {})
  requires :zone

  super({ :zone => zone }.merge!(attributes))
end