Class: Tracing::BaseFilter
Overview
abstract filter
Direct Known Subclasses
ArgumentFilter, ClassFilter, CompositeClassFilter, CompositeModuleFilter, InstanceVarFilter, ListInstanceVarFilter, MethodFilter, ModuleFilter
Class Attribute Summary collapse
-
.filters ⇒ Object
Returns the value of attribute filters.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rules ⇒ Object
Returns the value of attribute rules.
Class Method Summary collapse
-
.register_filters(hash) ⇒ Object
register symbol => filter mappings.
-
.unregister_filters(hash) ⇒ Object
array of symbols [:special_filter, :stream_filter].
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BaseFilter
constructor
A new instance of BaseFilter.
- #name_allow_action(name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ BaseFilter
Returns a new instance of BaseFilter.
26 27 28 |
# File 'lib/filters/filter.rb', line 26 def initialize( = {}) @name = [:name] || "Unknown filter" end |
Class Attribute Details
.filters ⇒ Object
Returns the value of attribute filters.
8 9 10 |
# File 'lib/filters/filter.rb', line 8 def filters @filters end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/filters/filter.rb', line 4 def name @name end |
#rules ⇒ Object
Returns the value of attribute rules.
5 6 7 |
# File 'lib/filters/filter.rb', line 5 def rules @rules end |
Class Method Details
.register_filters(hash) ⇒ Object
register symbol => filter mappings
11 12 13 14 15 16 |
# File 'lib/filters/filter.rb', line 11 def register_filters(hash) # puts "register_filters: #{hash.inspect}" @filters ||= {} @filters.merge!(hash) return @filters end |
.unregister_filters(hash) ⇒ Object
array of symbols
- :special_filter, :stream_filter
20 21 22 23 |
# File 'lib/filters/filter.rb', line 20 def unregister_filters(hash) @filters ||= {} filters.reject!{|key, value| hash.include? key} end |
Instance Method Details
#name_allow_action(name) ⇒ Object
30 31 32 33 |
# File 'lib/filters/filter.rb', line 30 def name_allow_action(name) puts "name_allow_action: #{name}" # res = rules.rules_allow_action(name) end |