class FuzzySub
Constants
- CHAR_2_NUM_SUB
Attributes
sub_hash[RW]
Public Class Methods
new(sub_hash)
click to toggle source
# File lib/fuzzy_matcher/fuzzy_sub.rb, line 12 def initialize(sub_hash) @sub_hash = sub_hash end
Public Instance Methods
fsub!(word)
click to toggle source
# File lib/fuzzy_matcher/fuzzy_sub.rb, line 16 def fsub!(word) sub_hash.each do |k, v| word.gsub!(/[#{k}]/, v) end word end