Class: Fluent::RecordReformerOutputCore::RubyPlaceholderExpander::CleanroomExpander
- Inherits:
-
Object
- Object
- Fluent::RecordReformerOutputCore::RubyPlaceholderExpander::CleanroomExpander
- Defined in:
- lib/fluent/plugin/out_record_reformer/core.rb
Instance Method Summary collapse
- #expand(__str_to_eval__, tag, time, record, tag_parts, tag_prefix, tag_suffix, hostname) ⇒ Object
-
#method_missing(name) ⇒ Object
for old version compatibility.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
for old version compatibility
333 334 335 336 337 338 339 340 341 |
# File 'lib/fluent/plugin/out_record_reformer/core.rb', line 333 def method_missing(name) key = name.to_s record = Thread.current[:record_reformer_record] if record.has_key?(key) record[key] else raise NameError, "undefined local variable or method `#{key}'" end end |
Instance Method Details
#expand(__str_to_eval__, tag, time, record, tag_parts, tag_prefix, tag_suffix, hostname) ⇒ Object
326 327 328 329 330 |
# File 'lib/fluent/plugin/out_record_reformer/core.rb', line 326 def (__str_to_eval__, tag, time, record, tag_parts, tag_prefix, tag_suffix, hostname) = tag_parts # for old version compatibility Thread.current[:record_reformer_record] = record # for old version compatibility instance_eval(__str_to_eval__) end |