Sha256: 0cf913b2a0ef729f81cb4c6e2d0624b993b0b86a50fae6794365479331b78be8

Contents?: true

Size: 628 Bytes

Versions: 16

Compression:

Stored size: 628 Bytes

Contents

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

module Fog
  module Compute
    class AWS
      class Tags < Fog::Collection
        attribute :filters

        model Fog::Compute::AWS::Tag

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

        def all(filters = filters)
          self.filters = filters
          data = service.describe_tags(filters).body
          load(data['tagSet'])
        end

        def get(key)
          if key
            self.class.new(:service => service).all('key' => key)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/compute/tags.rb
fog-1.26.0 lib/fog/aws/models/compute/tags.rb
fog-1.25.0 lib/fog/aws/models/compute/tags.rb
nsidc-fog-1.24.1 lib/fog/aws/models/compute/tags.rb
fog-1.24.0 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.11 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.10 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.9 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.8 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.7 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.6 lib/fog/aws/models/compute/tags.rb
fog-1.23.0 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.4 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.3 lib/fog/aws/models/compute/tags.rb
ns-fog-1.22.2 lib/fog/aws/models/compute/tags.rb
fog-1.22.1 lib/fog/aws/models/compute/tags.rb