Class Uttk::Filters::RPathFilter::Matcher
In: lib/uttk/filters/RPathFilter.rb
Parent: Object

Methods

[]   active?   have_a_star?   new  

Classes and Modules

Class Uttk::Filters::RPathFilter::Matcher::Disable

Attributes

block  [RW] 
buffer  [RW] 
re  [RW] 

Public Class methods

[Source]

# File lib/uttk/filters/RPathFilter.rb, line 88
        def initialize ( aRegexPath, aMethod=nil, &block )
          @re = aRegexPath
          @re = RegexPath.new(@re) unless @re.is_a? RegexPath
          @block = aMethod || block
          @have_a_star = @re.segments.any? { |x| x.captured? }
          @buffer = Filters::Buffer.new
          @active = true
        end

Public Instance methods

[Source]

# File lib/uttk/filters/RPathFilter.rb, line 105
        def [] ( obj, *args )
          begin
            if @block.is_a? Symbol
              obj.send(@block, *args)
            else
              @block[obj, *args]
            end
          rescue Disable
            @active = false
          end
        end

[Source]

# File lib/uttk/filters/RPathFilter.rb, line 101
        def active?
          @active
        end

[Source]

# File lib/uttk/filters/RPathFilter.rb, line 97
        def have_a_star?
          @have_a_star
        end

[Validate]