Class: ImproveTypography::Processors::Apostrophe
- Inherits:
-
ImproveTypography::Processor
- Object
- Struct
- ImproveTypography::Processor
- ImproveTypography::Processors::Apostrophe
- Defined in:
- lib/improve_typography/processors/apostrophe.rb
Constant Summary collapse
- REGEXP =
/(\w+)'(\w*)/i
Instance Attribute Summary
Attributes inherited from ImproveTypography::Processor
Instance Method Summary collapse
Methods inherited from ImproveTypography::Processor
Constructor Details
This class inherits a constructor from ImproveTypography::Processor
Instance Method Details
#call ⇒ Object
6 7 8 9 10 |
# File 'lib/improve_typography/processors/apostrophe.rb', line 6 def call return str unless sign_exists?(apostrophe_sign) return str unless str.match?(/'/) replace_apostrophe end |