Sha256: 5e878ba75f671132d42e9e7c018de00835664eee89e9f52336091d688abeb442

Contents?: true

Size: 418 Bytes

Versions: 15

Compression:

Stored size: 418 Bytes

Contents

require 'fog/core/model'

module Fog
  module Terremark
    module Shared

      class Address < Fog::Model

        identity :id

        attribute :ip, :aliases => 'name'

        def destroy
         requires :id
         connection.delete_public_ip(@id)
         true
        end

        private

        def href=(new_href)
          @id = new_href.split('/').last.to_i
        end

      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-0.3.22 lib/fog/terremark/models/shared/address.rb
fog-0.3.21 lib/fog/terremark/models/shared/address.rb
fog-0.3.20 lib/fog/terremark/models/shared/address.rb
fog-0.3.19 lib/fog/terremark/models/shared/address.rb
fog-0.3.18 lib/fog/terremark/models/shared/address.rb
fog-0.3.17 lib/fog/terremark/models/shared/address.rb
fog-0.3.16 lib/fog/terremark/models/shared/address.rb
fog-0.3.15 lib/fog/terremark/models/shared/address.rb
fog-0.3.14 lib/fog/terremark/models/shared/address.rb
fog-0.3.13 lib/fog/terremark/models/shared/address.rb
fog-0.3.12 lib/fog/terremark/models/shared/address.rb
fog-0.3.11 lib/fog/terremark/models/shared/address.rb
fog-0.3.10 lib/fog/terremark/models/shared/address.rb
fog-0.3.9 lib/fog/terremark/models/shared/address.rb
fog-0.3.8 lib/fog/terremark/models/shared/address.rb