module Webby::Filters - webby-0.9.4 Documentation

# module Webby::Filters

### Public Class Methods

[]( name ) click to toggle source

Access a filter handler

    # File lib/webby/filters.rb, line 18
    def []( name )
      _handlers[name]
    end

_handlers() click to toggle source

The registered filter handlers

    # File lib/webby/filters.rb, line 23
    def _handlers
      @handlers ||= {}
    end

process( renderer, page, input ) click to toggle source

Process input through filters

    # File lib/webby/filters.rb, line 12
    def process( renderer, page, input )
      # Start a new cursor for this page
      Cursor.new(renderer, page).start_for(input)
    end

register( filter, &block ) click to toggle source

Register a handler for a filter

    # File lib/webby/filters.rb, line 7
    def register( filter, &block )
      _handlers[filter.to_s] = block
    end