| Class | RegexPath::Segment |
| In: |
lib/regex_path.rb
|
| Parent: | Object |
| re | [R] |
# File lib/regex_path.rb, line 14 def initialize ( re, captured=false, negative=false ) @re = Regexp.new(re) @captured = !!captured @negative = !!negative end
# File lib/regex_path.rb, line 20 def =~ ( value ) match_data = @re.match(value) if negative? (match_data)? nil : (//.match value) else match_data end end