Class: Kiba::Extend::Utils::MarcNameCleaner
- Inherits:
-
Object
- Object
- Kiba::Extend::Utils::MarcNameCleaner
- Defined in:
- lib/kiba/extend/utils/marc_name_cleaner.rb
Overview
Callable service to clean punctuation off end of name string
Instance Method Summary collapse
Instance Method Details
#call(value) ⇒ String
14 15 16 17 18 |
# File 'lib/kiba/extend/utils/marc_name_cleaner.rb', line 14 def call(value) value.sub(/,$/, "") .sub(/([^ .].)\.$/, '\1') .sub(/,\.?$/, "") end |