Class: TagIt::TagSnapshot

Inherits:
Monitor
  • Object
show all
Defined in:
lib/tag_it/tag_snapshot.rb

Instance Attribute Summary

Attributes inherited from Monitor

#port

Instance Method Summary collapse

Methods inherited from Monitor

#initialize, #monitor_tags, #pulse!, #split_tag_data

Constructor Details

This class inherits a constructor from TagIt::Monitor

Instance Method Details

#shoot!Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/tag_it/tag_snapshot.rb', line 4

def shoot!
  tags = []
  begin 
    monitor_tags do |tag_name,strength|
      return tags if !tags.index(tag_name).nil?
      tags << tag_name
    end
  rescue Timeout::Error
    #do nothing, let tags return
  end
  tags
end