Module: RuboCop::StringUtil

Defined in:
lib/rubocop/string_util.rb

Overview

This module provides approximate string matching methods.

Class Method Summary collapse

Class Method Details

.similarity(string_a, string_b) ⇒ Object



10
11
12
# File 'lib/rubocop/string_util.rb', line 10

def similarity(string_a, string_b)
  JaroWinkler.distance(string_a.to_s, string_b.to_s)
end