Set argument properly

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-06-21 14:15:35 +09:00
parent de3ff9b135
commit d5d69b5dc7
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1
2 changed files with 6 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class Fluentd
end
def config_argument(name, type = ActiveModel::Type::Value.new, **options)
config_param(name, **options)
config_param(name, type, **options)
self._argument_name = name
end

View File

@ -23,7 +23,11 @@ class Fluentd
self._value_types[name] = _definition[:value_types] if _definition.key?(:value_types)
self._symbolize_keys = _definition[:symbolize_keys] if _definition.key?(:symbolize_keys)
else
config_param(_param_name, _definition[:type], **_definition.except(:type))
if _definition[:argument]
config_argument(_param_name, _definition[:type], **_definition.except(:type))
else
config_param(_param_name, _definition[:type], **_definition.except(:type))
end
end
end
end