module UselessString::CompareWithout
Public Instance Methods
cmp_without_alphabets(other_str)
click to toggle source
# File lib/compare_without.rb, line 36 def cmp_without_alphabets(other_str) remove_alphabets!(str = dup, other = other_str.dup) str <=> other end
cmp_without_carriage_return(other_str)
click to toggle source
# File lib/compare_without.rb, line 6 def cmp_without_carriage_return(other_str) remove_carriage_return!(str = dup, other = other_str.dup) str <=> other end
cmp_without_end_of_line(other_str)
click to toggle source
# File lib/compare_without.rb, line 16 def cmp_without_end_of_line(other_str) remove_end_of_line!(str = dup, other = other_str.dup) str <=> other end
cmp_without_line_feed(other_str)
click to toggle source
# File lib/compare_without.rb, line 11 def cmp_without_line_feed(other_str) remove_line_feed!(str = dup, other = other_str.dup) str <=> other end
cmp_without_numbers(other_str)
click to toggle source
# File lib/compare_without.rb, line 26 def cmp_without_numbers(other_str) remove_numbers!(str = dup, other = other_str.dup) str <=> other end
cmp_without_spaces(other_str)
click to toggle source
# File lib/compare_without.rb, line 21 def cmp_without_spaces(other_str) remove_spaces!(str = dup, other = other_str.dup) str <=> other end
cmp_without_special_characters(other_str)
click to toggle source
# File lib/compare_without.rb, line 31 def cmp_without_special_characters(other_str) remove_special_characters!(str = dup, other = other_str.dup) str <=> other end
cmp_without_theses_words(other_str, target_list, case_insensitive: true)
click to toggle source
# File lib/compare_without.rb, line 52 def cmp_without_theses_words(other_str, target_list, case_insensitive: true) remove_these_words!(str = dup, other = other_str.dup, target_list.dup, case_insensitive) str <=> other end
cmp_without_this(other_str, target)
click to toggle source
# File lib/compare_without.rb, line 41 def cmp_without_this(other_str, target) if target.is_a? Regexp remove_this_regex!(str = dup, other = other_str.dup, target) else remove_this!(str = dup, other = other_str.dup, target) end str <=> other end
Also aliased as: cmp_without_these, cmp_without_regex