module Fluent::PluginHelper
Public Class Methods
extended(mod)
click to toggle source
# File lib/fluent/plugin_helper.rb, line 45 def self.extended(mod) def mod.inherited(subclass) subclass.module_eval do @_plugin_helpers_list = [] end end end
Public Instance Methods
helpers(*snake_case_symbols)
click to toggle source
# File lib/fluent/plugin_helper.rb, line 65 def helpers(*snake_case_symbols) @_plugin_helpers_list ||= [] @_plugin_helpers_list.concat(snake_case_symbols) helpers_internal(*snake_case_symbols) end
helpers_internal(*snake_case_symbols)
click to toggle source
# File lib/fluent/plugin_helper.rb, line 53 def helpers_internal(*snake_case_symbols) helper_modules = [] snake_case_symbols.each do |name| begin helper_modules << Fluent::PluginHelper.const_get(name.to_s.split('_').map(&:capitalize).join) rescue NameError raise "Unknown plugin helper:#{name}" end end include(*helper_modules) end
plugin_helpers()
click to toggle source
# File lib/fluent/plugin_helper.rb, line 71 def plugin_helpers @_plugin_helpers_list || [] end