Module: Attentive::Text
Instance Method Summary collapse
Instance Method Details
#downcase(text) ⇒ Object
9 10 11 |
# File 'lib/attentive/text.rb', line 9 def downcase(text) text.downcase end |
#normalize(text) ⇒ Object
5 6 7 |
# File 'lib/attentive/text.rb', line 5 def normalize(text) straighten_quotes downcase text end |
#straighten_quotes(text) ⇒ Object
13 14 15 |
# File 'lib/attentive/text.rb', line 13 def straighten_quotes(text) text.gsub(/[“”]/, "\"").gsub(/[‘’]/, "'") end |