Parent

Class/Module Index [+]

Quicksearch

Fluent::Match

Attributes

output[R]

Public Class Methods

new(pattern_str, output) click to toggle source
# File lib/fluent/match.rb, line 22
def initialize(pattern_str, output)
  patterns = pattern_str.split(/\s+/).map {|str|
    MatchPattern.create(str)
  }
  if patterns.length == 1
    @pattern = patterns[0]
  else
    @pattern = OrMatchPattern.new(patterns)
  end
  @output = output
end

Public Instance Methods

emit(tag, es) click to toggle source
# File lib/fluent/match.rb, line 36
def emit(tag, es)
  chain = NullOutputChain.instance
  @output.emit(tag, es, chain)
end
match(tag) click to toggle source
# File lib/fluent/match.rb, line 49
def match(tag)
  if @pattern.match(tag)
    return true
  end
  return false
end
shutdown() click to toggle source
# File lib/fluent/match.rb, line 45
def shutdown
  @output.shutdown
end
start() click to toggle source
# File lib/fluent/match.rb, line 41
def start
  @output.start
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.