Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/sqlstmt/core_to_sql.rb
Instance Method Summary collapse
Instance Method Details
#to_sql ⇒ Object
6 7 8 9 10 |
# File 'lib/sqlstmt/core_to_sql.rb', line 6 def to_sql str = gsub('\\') {'\\\\'} str = str.gsub("'") {"''"} return "'#{str}'" end |