Parent

Typhoeus::Filter

Attributes

method_name[R]

Public Class Methods

new(method_name, options = {}) click to toggle source
   # File lib/typhoeus/filter.rb, line 5
5:     def initialize(method_name, options = {})
6:       @method_name = method_name
7:       @options = options
8:     end

Public Instance Methods

apply_filter?(method_name) click to toggle source
    # File lib/typhoeus/filter.rb, line 10
10:     def apply_filter?(method_name)
11:       if @options[:only]
12:         if @options[:only].instance_of? Symbol
13:           @options[:only] == method_name
14:         else
15:           @options[:only].include?(method_name)
16:         end
17:       elsif @options[:except]
18:         if @options[:except].instance_of? Symbol
19:           @options[:except] != method_name
20:         else
21:           !@options[:except].include?(method_name)
22:         end
23:       else
24:         true
25:       end
26:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.