Sha256: 88d35e0d4a0e9a6729bc58b75229a6da241f650494e596a8a0145fc96a20602f

Contents?: true

Size: 185 Bytes

Versions: 63

Compression:

Stored size: 185 Bytes

Contents

# encoding: utf-8

class String
  # escape double quote.
  #
  # ==== Examples
  #
  #   "hoge'hige".escape_quote # => "hoge''hige"
  #
  def escape_quote
    gsub("'", "''")
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.151 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.150 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.149 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.148 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.147 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.146 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.145 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.144 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.143 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.142 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.141 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.140 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.139 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.138 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.137 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.136 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.135 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.134 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.133 lib/open_classes/string/escape_quote.rb
tbpgr_utils-0.0.132 lib/open_classes/string/escape_quote.rb