module T1000::Refinements
Public Instance Methods
map_regex()
click to toggle source
# File lib/t-1000.rb, line 23 def map_regex map do |value| case value when Regexp value else Regexp.new Regexp.escape value.to_s end end end
match_any?(string)
click to toggle source
# File lib/t-1000.rb, line 34 def match_any?(string) map_regex.any? do |regex| string =~ regex end end
stringify()
click to toggle source
# File lib/t-1000.rb, line 40 def stringify map(&:to_s).join ', ' end