Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#cleanquotes ⇒ Object
6 7 8 |
# File 'lib/core_ext/string.rb', line 6 def cleanquotes gsub(/["']/, '') end |
#commasplit ⇒ Object
2 3 4 |
# File 'lib/core_ext/string.rb', line 2 def commasplit split(',').map(&:strip) end |
#to_html ⇒ Object
14 15 16 |
# File 'lib/core_ext/string.rb', line 14 def to_html gsub(/\n/, '<br />').gsub(/\t/, ' ') end |
#to_plaintext ⇒ Object
10 11 12 |
# File 'lib/core_ext/string.rb', line 10 def to_plaintext gsub(/\n/, '\n').gsub(/\t/, '\t') end |