Class Uttk::Filters::KeepSkipBased
In: lib/uttk/filters/KeepSkipBased.rb
Parent: Id

Methods

keep?   new   skip?  

Included Modules

Concrete

Attributes

keep  [R] 
skip  [R] 

Public Class methods

[Source]

# File lib/uttk/filters/KeepSkipBased.rb, line 18
      def initialize ( observers, options, &b )
        super
        @keep, @skip, @action = @options.values_at :keep, :skip, :action
      end

Public Instance methods

[Source]

# File lib/uttk/filters/KeepSkipBased.rb, line 24
      def keep? ( node )
        node_s = node.to_s
        (node_s =~ @keep and node_s !~ @skip)
      end

[Source]

# File lib/uttk/filters/KeepSkipBased.rb, line 30
      def skip? ( node )
        ! keep? node
      end

[Validate]