Class: Tracing::ClassFilter

Inherits:
BaseFilter show all
Defined in:
lib/filters/simple/class_filter.rb

Overview

filter on class name

Instance Attribute Summary

Attributes inherited from BaseFilter

#name, #rules

Instance Method Summary collapse

Methods inherited from BaseFilter

#name_allow_action, register_filters, unregister_filters

Constructor Details

#initialize(options) ⇒ ClassFilter

Returns a new instance of ClassFilter.



4
5
6
7
# File 'lib/filters/simple/class_filter.rb', line 4

def initialize(options)
  super(options)      
  @rules = options[:class_rules] || options[:class_filter] || {}
end

Instance Method Details

#allow_action(msg, context) ⇒ Object



9
10
11
12
13
# File 'lib/filters/simple/class_filter.rb', line 9

def allow_action(msg, context)
  name = context[:class_name]
  # puts "class_name: #{name}"
  allow = name_allow_action(name)
end