Class: Fluent::Helper::PluginSpec::Driver::BatchPitcher

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/helper/plugin_spec.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, tag, time = Time.now.to_i) ⇒ BatchPitcher

Returns a new instance of BatchPitcher.



80
81
82
83
84
# File 'lib/fluent/helper/plugin_spec.rb', line 80

def initialize(parent, tag, time=Time.now.to_i)
  @parent = parent
  @tag = tag
  @time = time
end

Instance Method Details

#pitch(record, time = nil) ⇒ Object



85
86
87
# File 'lib/fluent/helper/plugin_spec.rb', line 85

def pitch(record, time=nil)
  @parent.pitch(@tag, time ? time : @time, record)
end

#pitches(es) ⇒ Object



89
90
91
# File 'lib/fluent/helper/plugin_spec.rb', line 89

def pitches(es)
  @parent.pitches(@tag, es)
end