Sha256: 5020b595f0409e47d1bf53bcc93a457adf67aebaa29e535b33f09745ca50ca71

Contents?: true

Size: 648 Bytes

Versions: 16

Compression:

Stored size: 648 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/aws/tag'

module Fog
  module AWS
    class Compute

      class Tags < Fog::Collection

        attribute :filters

        model Fog::AWS::Compute::Tag

        def initialize(attributes)
          self.filters ||= {}
          super
        end

        def all(filters = filters)
          self.filters = filters
          data = connection.describe_tags(filters).body
          load(data['tagSet'])
        end
        
        def get(key)
          if key
            self.class.new(:connection => connection).all('key' => key)
          end
        end
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
fog-0.8.2 lib/fog/compute/models/aws/tags.rb
fog-0.8.1 lib/fog/compute/models/aws/tags.rb
fog-0.8.0 lib/fog/compute/models/aws/tags.rb
fog-0.7.2 lib/fog/compute/models/aws/tags.rb
fog-0.7.1 lib/fog/compute/models/aws/tags.rb
fog-0.7.0 lib/fog/compute/models/aws/tags.rb
fog-0.6.0 lib/fog/compute/models/aws/tags.rb
fog-0.5.3 lib/fog/compute/models/aws/tags.rb
fog-0.5.2 lib/fog/compute/models/aws/tags.rb
fog-0.5.1 lib/fog/compute/models/aws/tags.rb
fog-0.5.0 lib/fog/compute/models/aws/tags.rb
phpfog-fog-0.4.1.3 lib/fog/compute/models/aws/tags.rb
phpfog-fog-0.4.1.2 lib/fog/compute/models/aws/tags.rb
phpfog-fog-0.4.1.1 lib/fog/compute/models/aws/tags.rb
phpfog-fog-0.4.1 lib/fog/compute/models/aws/tags.rb
fog-0.4.1 lib/fog/compute/models/aws/tags.rb