Module: AWSTracker::Taggable

Included in:
EBSVolume, Instance
Defined in:
lib/aws_tracker/models/_taggable.rb

Instance Method Summary collapse

Instance Method Details

#tag_hashObject

returns the collection of AWSTracker::Tags as a Hash



5
6
7
8
9
10
# File 'lib/aws_tracker/models/_taggable.rb', line 5

def tag_hash
  Tag.where(:resource_id => self).inject({}) do |hash, tag|
    hash[tag.key] = tag.value
    hash
  end
end