Module: StrSanitizer::Quotes::ClassMethods
- Defined in:
- lib/str_sanitizer/quotes.rb
Instance Method Summary collapse
Instance Method Details
#double_quote(str) ⇒ Object
12 13 14 |
# File 'lib/str_sanitizer/quotes.rb', line 12 def double_quote(str) str.gsub!(/"/, '\"') end |
#single_quote(str) ⇒ Object
16 17 18 |
# File 'lib/str_sanitizer/quotes.rb', line 16 def single_quote(str) str.gsub!(/'/, "\'") end |