class Filigree::RegexpPattern
A pattern that tests a string against a regular expression.
Public Instance Methods
match?(object, env)
click to toggle source
Test the object to see if it matches the wrapped regular expression.
@param [Object] object Object
to test pattern against @param [Object] env Binding environment
@return [Boolean]
# File lib/filigree/match.rb, line 408 def match?(object, env) (object.is_a?(String) and (md = @pattern_elem.match(object))).tap do |match| env.send("match_data=", md) if match end end
weight()
click to toggle source
# File lib/filigree/match.rb, line 414 def weight 2 end