lib/wordy_number/wordy_match.rb
# filter out patterns with consecutive digits
filter out patterns with consecutive digits
filter out patterns with consecutive digits
def filtered_list(list_of_num_strs=self.num_patterns.clone)
      unless list_of_num_strs
        raise InvalidInputError
      end
      list_of_num_strs.delete_if{ |pattern| pattern.split(DEFAULT_SEPARATOR).join("") =~ /\d{2}/ }
      self.num_filtered_patterns = list_of_num_strs
      self.num_filtered_patterns
    end
def filtered_list ( list_of_num_strs = self . num_patterns . clone ) unless list_of_num_strs raise InvalidInputError end list_of_num_strs . delete_if { | pattern | pattern . split ( DEFAULT_SEPARATOR ) . join ( "" ) =~ / \d {2} / } self . num_filtered_patterns = list_of_num_strs self . num_filtered_patterns end
filter out patterns with consecutive digits
filter out patterns with consecutive digits
list_of_num_strs
<not_specific>
num_patterns
<not_specific>
clone
<not_specific>