Sha256: 05c294fbe7bb643ec3cf61406a5475a2eedce3e47b55325902e57d7ede2231a6

Contents?: true

Size: 634 Bytes

Versions: 15

Compression:

Stored size: 634 Bytes

Contents

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

module Fog
  module AWS
    class Compute

      class Tags < Fog::Collection

        attribute :filters

        model Fog::AWS::Compute::Tag

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

        def all(filters = @filters)
          @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

15 entries across 15 versions & 1 rubygems

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