Sha256: 7254e6ca6d8b8eb09ec1eef334d4853f0c096fe6da8f3a349b2726365108b00e
Contents?: true
Size: 374 Bytes
Versions: 26
Compression:
Stored size: 374 Bytes
Contents
class Betterdocs::Sanitizer JSON_NONSTRING_TYPES = Tins::ModuleGroup[ TrueClass, FalseClass, NilClass, Numeric, Array, Hash, ] def initialize(&sanitize) @sanitize = sanitize end def sanitize(value) @sanitize or return value if JSON_NONSTRING_TYPES === value value else @sanitize.(value.to_s) end end end
Version data entries
26 entries across 26 versions & 1 rubygems