class Scraprr::RegexpFilter
Public Class Methods
new(chain, regexp)
click to toggle source
# File lib/scraprr/regexp_filter.rb, line 3 def initialize(chain, regexp) @chain = chain @regexp = regexp end
Public Instance Methods
run(value)
click to toggle source
# File lib/scraprr/regexp_filter.rb, line 8 def run(value) match = @regexp.match(@chain.run(value)) if match match[1] end end