Class: StandaloneTypograf::Typograf
- Inherits:
-
Object
- Object
- StandaloneTypograf::Typograf
- Defined in:
- lib/standalone_typograf.rb
Constant Summary
Constants included from Fractions
Constants included from Nbspace
Constants included from Quotes
Quotes::QUOTES, Quotes::SOURCE
Constants included from Signs
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Typograf
constructor
A new instance of Typograf.
- #prepare ⇒ Object
Methods included from Fractions
Methods included from Nbspace
Methods included from Endash
Methods included from Dots
Methods included from Quotes
Methods included from Signs
Methods included from Dasherize
Constructor Details
#initialize(text, options = {}) ⇒ Typograf
Returns a new instance of Typograf.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/standalone_typograf.rb', line 22 def initialize(text, ={}) [:signs] ||= SIGNS [:signs_ru] ||= SIGNS_RU [:quotes] ||= QUOTES # except - массив с названием методов, которые необходимо исключить при выполнении # *prepare* @except = [:except] @signs, @signs_ru = SIGNS.merge([:signs]), SIGNS_RU.merge([:signs_ru]) @quotes = QUOTES.merge([:quotes]) @text = text end |
Instance Method Details
#prepare ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/standalone_typograf.rb', line 34 def prepare call_method :dasherize call_method :signs call_method :quotes call_method :dots call_method :endash call_method :nbspace call_method :fractions @text end |