class Fluent::StatusClass
Public Class Methods
new()
click to toggle source
# File lib/fluent/status.rb, line 20 def initialize @entries = {} @mutex = Mutex.new end
Public Instance Methods
each(&block)
click to toggle source
# File lib/fluent/status.rb, line 32 def each(&block) @mutex.synchronize { @entries.each {|obj_id,hash| record = {} hash.each_pair {|name,block| record[name] = block.call } block.call(record) } } end
register(instance, name, &block)
click to toggle source
# File lib/fluent/status.rb, line 25 def register(instance, name, &block) @mutex.synchronize { (@entries[instance.object_id] ||= {})[name] = block } nil end