Class: Dash
- Inherits:
-
Object
- Object
- Dash
- Defined in:
- lib/rus_typograf/dash.rb
Overview
Класс который работает с дефисами и тире
Instance Method Summary collapse
-
#replace_dash(text) ⇒ Object
Заменяем – на дефис.
Instance Method Details
#replace_dash(text) ⇒ Object
Заменяем – на дефис
4 5 6 |
# File 'lib/rus_typograf/dash.rb', line 4 def replace_dash(text) text = text.gsub(/[-][-]/, '—') end |