Parent

Files

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::Address

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/fog/aws/models/compute/address.rb, line 13
def initialize(attributes = {})
  # assign server first to prevent race condition with new_record?
  self.server = attributes.delete(:server)
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/aws/models/compute/address.rb, line 19
def destroy
  requires :public_ip

  connection.release_address(public_ip)
  true
end
save() click to toggle source
# File lib/fog/aws/models/compute/address.rb, line 34
def save
  raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity
  data = connection.allocate_address.body
  new_attributes = data.reject {|key,value| key == 'requestId'}
  merge_attributes(new_attributes)
  if @server
    self.server = @server
  end
  true
end
server=(new_server) click to toggle source
# File lib/fog/aws/models/compute/address.rb, line 26
def server=(new_server)
  if new_server
    associate(new_server)
  else
    disassociate
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.