Module: Docter

Defined in:
lib/docter.rb,
lib/docter/page.rb,
lib/docter/rake.rb,
lib/docter/common.rb,
lib/docter/server.rb,
lib/docter/template.rb,
lib/docter/collection.rb,
lib/docter/ultraviolet.rb

Defined Under Namespace

Modules: Filter, HTML, Rake, Resource Classes: Collection, MongrelHandler, Page, Server, Template, ToC, ToCEntry

Constant Summary collapse

VERSION =
'1.1.3'.freeze
SYNTAX_THEME =
'eiffel'
SYNTAX_STYLESHEET =
"css/#{SYNTAX_THEME}.css"
SYNTAX_MAP =
{ 'sh'=>'shell-unix-generic' }

Class Method Summary collapse

Class Method Details

.collection(title = nil) ⇒ Object

:call-seq:

collection(title?) => Collection

Creates and returns a new collection. The collection initially does not include any files. When created from a ToC file, the collection bases its ToC on that file, otherwise it creates a ToC form all pages included in the collection.



314
315
316
# File 'lib/docter/collection.rb', line 314

def collection(title = nil)
  Collection.new(title)
end

.filter_for(name, &block) ⇒ Object

:call-seq:

filter_for(name) { |html| ... }

Defines a filter for name using a block that will transform the HTML.



287
288
289
# File 'lib/docter/page.rb', line 287

def filter_for(name, &block)
  Filter.filter_for(name, &block)
end

.page(*args) ⇒ Object

:call-seq:

page(filename, options?)
page(format, content, options?)

The first form loads the page from the specified filename. The second creates the page from the content string based on the specified format.



297
298
299
# File 'lib/docter/page.rb', line 297

def page(*args)
  Page.new(*args)
end

.template(*args) ⇒ Object

:call-seq:

template(filename, options?)
template(format, content, options?)

The first form loads the template from the specified filename. The second creates the template from the content string based on the specified format.



209
210
211
# File 'lib/docter/template.rb', line 209

def template(*args)
  Template.new(*args)
end

.toc(*args) ⇒ Object



318
319
320
# File 'lib/docter/collection.rb', line 318

def toc(*args)
  Collection::ToCResource.new(*args)
end