Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/typogrowth/string.rb
Instance Method Summary collapse
- #is_ru?(shadows = []) ⇒ Boolean
-
#typo(lang = nil) ⇒ Object
Typographyes the string and returns a result See Typogrowth::Parser#parse.
-
#typo!(lang = nil) ⇒ Object
Typographyes the string inplace See Typogrowth::Parser#parse!.
Instance Method Details
#is_ru?(shadows = []) ⇒ Boolean
18 19 20 |
# File 'lib/typogrowth/string.rb', line 18 def is_ru? shadows = [] Typogrowth.is_ru? self, shadows: shadows end |
#typo(lang = nil) ⇒ Object
Typographyes the string and returns a result See Typogrowth::Parser#parse
9 10 11 |
# File 'lib/typogrowth/string.rb', line 9 def typo lang = nil Typogrowth.parse(self, lang: lang ? lang : is_ru? ? "ru" : I18n.locale) end |
#typo!(lang = nil) ⇒ Object
Typographyes the string inplace See Typogrowth::Parser#parse!
14 15 16 |
# File 'lib/typogrowth/string.rb', line 14 def typo! lang = nil Typogrowth.parse!(self, lang: lang ? lang : is_ru? ? "ru" : I18n.locale) end |