Parent

Files

File::Tail::Tailer

This class supervises activity on a tailed fail and collects newly read lines until the Tail::Group fetches and processes them.

Public Instance Methods

method_missing(id, *args, &block) click to toggle source

Return the thread local variable id if it is defined.

# File lib/file/tail/tailer.rb, line 27
def method_missing(id, *args, &block)
  if args.empty? && !(value = self[id]).nil?
    value
  else
    super
  end
end
pending_lines() click to toggle source

Fetch all the pending lines from this Tailer and thereby remove them from the Tailer’s queue.

# File lib/file/tail/tailer.rb, line 14
def pending_lines
  Array.new(queue.size) { queue.deq(true) }
end
pending_lines?() click to toggle source

True if there are any lines pending on this Tailer, false otherwise.

# File lib/file/tail/tailer.rb, line 8
def pending_lines?
  !queue.empty?
end
respond_to?(id) click to toggle source

Return true if the thread local variable id is defined or if this object responds to the method id.

# File lib/file/tail/tailer.rb, line 22
def respond_to?(id)
  !self[id].nil? || super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.