mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-31 19:21:05 +02:00
Add Fluentd::Setting::Type::Regexp
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
6ef0380b3e
commit
e4a33d21ae
17
app/models/fluentd/setting/type/regexp.rb
Normal file
17
app/models/fluentd/setting/type/regexp.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class Fluentd
|
||||
module Setting
|
||||
module Type
|
||||
class Regexp < ActiveModel::Type::Value
|
||||
def type
|
||||
:regexp
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def cast_value(value)
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -2,5 +2,6 @@ ActiveModel::Type.register(:array, Fluentd::Setting::Type::Array)
|
||||
ActiveModel::Type.register(:enum, Fluentd::Setting::Type::Enum)
|
||||
ActiveModel::Type.register(:bool, Fluentd::Setting::Type::Bool)
|
||||
ActiveModel::Type.register(:hash, Fluentd::Setting::Type::Hash)
|
||||
ActiveModel::Type.register(:regexp, Fluentd::Setting::Type::Hash)
|
||||
ActiveModel::Type.register(:size, Fluentd::Setting::Type::Size)
|
||||
ActiveModel::Type.register(:section, Fluentd::Setting::Type::Section)
|
||||
|
Loading…
x
Reference in New Issue
Block a user