Class Filter
In: lib/network/protocol/filter.rb
Parent: Object
Filter
dot/f_33.png

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

A Filter can keep state and partial data

Methods

filter_in   filter_out   init   new  

Public Class methods

Construct filter

pstack
The ProtocolStack associated with this filter

[Source]

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

Public Instance methods

The filter_in method filters input data

str
The string to be processed
return
The filtered data

[Source]

# File lib/network/protocol/filter.rb, line 37
  def filter_in(str)
    str
  end

The filter_out method filters output data

str
The string to be processed
return
The filtered data

[Source]

# File lib/network/protocol/filter.rb, line 44
  def filter_out(str)
    str
  end

Run any post-contruction initialization

args
Optional initial options

[Source]

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

[Validate]