class InputSanitizer::V2::NestedSanitizerFactory
Public Class Methods
for(nested_sanitizer_klass, value, options)
click to toggle source
# File lib/input_sanitizer/v2/nested_sanitizer_factory.rb, line 12 def self.for(nested_sanitizer_klass, value, options) if value.nil? && options[:allow_nil] && !options[:collection] NilAllowed.new else nested_sanitizer_klass.new(value, options) end end