1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/models/ec2/addresses.rb
2009-08-19 09:11:26 -07:00

36 lines
728 B
Ruby

module Fog
module AWS
class EC2
def addresses
Fog::AWS::EC2::Addresses.new(:connection => self)
end
class Addresses < Fog::Collection
def all(public_ip = [])
data = connection.describe_addresses(public_ip).body
addresses = []
data['addressesSet'].each do |address|
addresses << Fog::AWS::EC2::Address.new({
:connection => connection
}.merge!(address))
end
addresses
end
def create
address = new
address.save
address
end
def new
Fog::AWS::S3::Address.new(:connection => connection)
end
end
end
end
end