class Filter

The Filter class is an abstract class defining the minimal methods needed to filter data.

A Filter can keep state and partial data

Public Class Methods

new(pstack) click to toggle source

Construct filter

pstack

The ProtocolStack associated with this filter

# File lib/network/protocol/filter.rb, line 24
def initialize(pstack)
  @pstack = pstack
end

Public Instance Methods

filter_in(str) click to toggle source

The #filter_in method filters input data

str

The string to be processed

return

The filtered data

# File lib/network/protocol/filter.rb, line 37
def filter_in(str)
  str
end
filter_out(str) click to toggle source

The #filter_out method filters output data

str

The string to be processed

return

The filtered data

# File lib/network/protocol/filter.rb, line 44
def filter_out(str)
  str
end
init(args=nil) click to toggle source

Run any post-contruction initialization

args

Optional initial options

# File lib/network/protocol/filter.rb, line 30
def init(args=nil)
  true
end