module Cl::Regex
Public Instance Methods
format_regex(str)
click to toggle source
# File lib/cl/helper.rb, line 15 def format_regex(str) return str unless str.is_a?(Regexp) "/#{str.to_s.sub('(?-mix:', '').sub(/\)$/, '')}/" end