Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/lib/soap/filter/filterchain.rb

Revision 1868, 0.8 kB (checked in by nahi, 2 years ago)
  • added an API for filtering streamhandler to capture/generate HTTP header. closes #276.
Line 
1 # SOAP4R - SOAP filter chain.
2 # Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
4 # This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
5 # redistribute it and/or modify it under the same terms of Ruby's license;
6 # either the dual license version in 2003, or any later version.
7
8
9 require 'soap/filter/handler'
10
11
12 module SOAP
13 module Filter
14
15
16 class FilterChain
17
18   def each
19     @array.each do |filter|
20       yield filter
21     end
22   end
23
24   def reverse_each
25     @array.reverse_each do |filter|
26       yield filter
27     end
28   end
29
30   def initialize
31     @array = []
32   end
33
34   def add(filter)
35     @array << filter
36   end
37   alias << add
38
39   def delete(filter)
40     @array.delete(filter)
41   end
42
43   def include?(filter)
44     @array.include?(filter)
45   end
46
47 end
48
49
50 end
51 end
Note: See TracBrowser for help on using the browser.