Sha256: 608d3315ef24e76172f4dfc96bff73352708b7196e0feafc1af9158f071adb3d

Contents?: true

Size: 302 Bytes

Versions: 4

Compression:

Stored size: 302 Bytes

Contents

require 'phonetic/metaphone'

class String
  # Metaphone value of string.
  # @example
  #    'Accola'.metaphone # => 'AKKL'
  #    'Nikki'.metaphone # => 'NK'
  #    'Wright'.metaphone #=> 'RT'
  def metaphone(options = { size: 4 })
    Phonetic::Metaphone.encode(self, options)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phonetic-1.2.0 lib/phonetic/core_ext/string/metaphone.rb
phonetic-1.1.0 lib/phonetic/core_ext/string/metaphone.rb
phonetic-1.0.1 lib/phonetic/core_ext/string/metaphone.rb
phonetic-1.0.0 lib/phonetic/core_ext/string/metaphone.rb