class Twiddler::TargetBuilder::RegexpBuilder
Public Instance Methods
go()
click to toggle source
# File lib/twiddler/target_builder.rb, line 47 def go output_to(filename) do |file| @dict.grep(regexp) do |word| file.puts(word) end end end
match_any_of(list)
click to toggle source
# File lib/twiddler/target_builder.rb, line 44 def match_any_of(list) return "(?:#{list.map{|it| Regexp::escape(it)}.join(")|(?:")})" end