Module: Webby::Filters

Defined in:
lib/webby/filters.rb,
lib/webby/filters/tidy.rb,
lib/webby/filters/slides.rb,
lib/webby/filters/outline.rb,
lib/webby/filters/basepath.rb

Defined Under Namespace

Classes: BasePath, Cursor, Outline, Slides, Tidy

Class Method Summary (collapse)

Class Method Details

+ (Object) [](name)

Access a filter handler



18
19
20
# File 'lib/webby/filters.rb', line 18

def []( name )
  _handlers[name]
end

+ (Object) _handlers

The registered filter handlers



23
24
25
# File 'lib/webby/filters.rb', line 23

def _handlers
  @handlers ||= {}
end

+ (Object) process(renderer, page, input)

Process input through filters



12
13
14
15
# 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

+ (Object) register(filter, &block)

Register a handler for a filter



7
8
9
# File 'lib/webby/filters.rb', line 7

def register( filter, &block )
  _handlers[filter.to_s] = block
end