Sha256: 790c76ab5d70ba7a12a5745edc267367c2fce704f57ada6e16f70ce2c11c6cc7
Contents?: true
Size: 446 Bytes
Versions: 2
Compression:
Stored size: 446 Bytes
Contents
module Convert module Converters CONFIGS = [:custom, :full, :linebreaks, :simple, :restricted, :basic, :relaxed] def sanitize(string, options = {}) return string if options[:config] == false options = {:config => nil}.merge(options) config = Object.const_get("Sanitize::Config::#{options[:config].to_s.upcase}") if CONFIGS.include?(options[:config]) Sanitize.fragment(string, config || {}) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
convert-0.1.4 | lib/converters/sanitize.rb |
convert-0.1.3 | lib/converters/sanitize.rb |