Module: WhereableClause::Literal

Defined in:
lib/whereable_clause.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject

Strip enclosing quotes and tranlate embedded quote patterns



113
114
115
116
117
118
119
# File 'lib/whereable_clause.rb', line 113

def to_s
  text_value
    .gsub(/\A['"]|['"]\z/, '')
    .gsub("''", "'")
    .gsub("\\'", "'")
    .gsub('\"', '"')
end