Module: SexySlug::AbbreviationDot

Defined in:
lib/sexy_slug/abbreviation_dot.rb

Constant Summary collapse

PATTERN =
/(?:\s|\(|^)(?:\p{alpha}(?:\.\p{alpha})+\.?\p{alpha}*(?:\s|\)|$))/

Class Method Summary collapse

Class Method Details

.call(string) ⇒ Object



2
3
4
# File 'lib/sexy_slug/abbreviation_dot.rb', line 2

def self.call(string)
  string.gsub(PATTERN) { |match| match.tr('.', '') }
end