input_sanitizer 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -57,24 +57,12 @@ class InputSanitizer::Sanitizer
|
|
57
57
|
subclass.fields = self.fields.dup
|
58
58
|
end
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.boolean(*keys)
|
69
|
-
set_keys_to_type(keys, :boolean)
|
70
|
-
end
|
71
|
-
|
72
|
-
def self.date(*keys)
|
73
|
-
set_keys_to_type(keys, :date)
|
74
|
-
end
|
75
|
-
|
76
|
-
def self.time(*keys)
|
77
|
-
set_keys_to_type(keys, :time)
|
60
|
+
converters.keys.each do |name|
|
61
|
+
class_eval <<-END
|
62
|
+
def self.#{name}(*keys)
|
63
|
+
set_keys_to_type(keys, :#{name})
|
64
|
+
end
|
65
|
+
END
|
78
66
|
end
|
79
67
|
|
80
68
|
def self.custom(*keys)
|