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

.[](name) ⇒ Object

Access a filter handler



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

def []( name )
  _handlers[name]
end

._handlersObject

The registered filter handlers



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

def _handlers
  @handlers ||= {}
end

.process(renderer, page, input) ⇒ Object

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

.register(filter, &block) ⇒ Object

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