mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 09:17:05 +02:00
22 lines
650 B
Ruby
22 lines
650 B
Ruby
class Fluentd
|
|
module Setting
|
|
module SectionParser
|
|
extend ActiveSupport::Concern
|
|
|
|
module ClassMethods
|
|
def parse_section(name, definition)
|
|
config_section(name, **definition.slice(:required, :multi, :alias)) do
|
|
definition.except(:section, :argument, :required, :multi, :alias).each do |_param_name, _definition|
|
|
if _definition[:section]
|
|
parse_section(_param_name, _definition)
|
|
else
|
|
config_param(_param_name, _definition[:type], **_definition.except(:type))
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|