Parent

Class/Module Index [+]

Quicksearch

Fluent::StatusClass

Public Class Methods

new() click to toggle source
# File lib/fluent/status.rb, line 23
def initialize
  @entries = {}
  @mutex = Mutex.new
end

Public Instance Methods

each(&block) click to toggle source
# File lib/fluent/status.rb, line 35
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 28
def register(instance, name, &block)
  @mutex.synchronize {
    (@entries[instance.object_id] ||= {})[name] = block
  }
  nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.