class Slacken::Filter

Public: Base class of filters for DocumentComponent.

Attributes

options[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/slacken/filter.rb, line 5
def initialize(options = {})
  @options = options
end

Public Instance Methods

call(component) click to toggle source

Public: Create a new refined DocumentComponent from the given component.

component - A DocumentComponent object.

Returns a new refined DocumentComponent object.

# File lib/slacken/filter.rb, line 14
def call(component)
  fail NotImplementedError
end
valid?(component) click to toggle source

Public: Check if the given component passes postcondition of the filter.

component - A DocumentComponent object to check.

Returns true if the component passes the postcondition.

# File lib/slacken/filter.rb, line 23
def valid?(component)
  true
end