Module: Brandish

Defined in:
lib/brandish.rb,
lib/brandish/errors.rb,
lib/brandish/markup.rb,
lib/brandish/parser.rb,
lib/brandish/execute.rb,
lib/brandish/scanner.rb,
lib/brandish/version.rb,
lib/brandish/path_set.rb,
lib/brandish/configure.rb,
lib/brandish/processor.rb,
lib/brandish/processors.rb,
lib/brandish/application.rb,
lib/brandish/parser/main.rb,
lib/brandish/parser/node.rb,
lib/brandish/configure/dsl.rb,
lib/brandish/configure/form.rb,
lib/brandish/processor/base.rb,
lib/brandish/processors/all.rb,
lib/brandish/processor/block.rb,
lib/brandish/processors/html.rb,
lib/brandish/markup/redcarpet.rb,
lib/brandish/parser/node/pair.rb,
lib/brandish/parser/node/root.rb,
lib/brandish/parser/node/text.rb,
lib/brandish/processor/inline.rb,
lib/brandish/processors/latex.rb,
lib/brandish/parser/node/block.rb,
lib/brandish/processor/command.rb,
lib/brandish/processor/context.rb,
lib/brandish/processor/descend.rb,
lib/brandish/processors/all/if.rb,
lib/brandish/processors/common.rb,
lib/brandish/configure/dsl/form.rb,
lib/brandish/parser/node/string.rb,
lib/brandish/parser/node/command.rb,
lib/brandish/processors/all/embed.rb,
lib/brandish/markup/redcarpet/html.rb,
lib/brandish/processor/name_filter.rb,
lib/brandish/processor/pair_filter.rb,
lib/brandish/processors/all/import.rb,
lib/brandish/processors/all/verify.rb,
lib/brandish/processors/html/group.rb,
lib/brandish/processors/html/style.rb,
lib/brandish/processors/all/comment.rb,
lib/brandish/processors/all/literal.rb,
lib/brandish/processors/html/header.rb,
lib/brandish/processors/html/markup.rb,
lib/brandish/processors/html/output.rb,
lib/brandish/processors/html/script.rb,
lib/brandish/markup/redcarpet/format.rb,
lib/brandish/processors/common/asset.rb,
lib/brandish/processors/common/group.rb,
lib/brandish/processors/latex/markup.rb,
lib/brandish/processors/common/header.rb,
lib/brandish/processors/common/markup.rb,
lib/brandish/processors/common/output.rb,
lib/brandish/application/bench_command.rb,
lib/brandish/application/build_command.rb,
lib/brandish/application/serve_command.rb,
lib/brandish/processors/html/style/sass.rb,
lib/brandish/processors/html/script/babel.rb,
lib/brandish/processors/common/asset/paths.rb,
lib/brandish/processors/html/script/coffee.rb,
lib/brandish/processors/html/style/vanilla.rb,
lib/brandish/application/initialize_command.rb,
lib/brandish/processors/html/script/vanilla.rb,
lib/brandish/processors/html/output/document.rb,
lib/brandish/processors/html/style/highlight.rb

Overview

A library to format text.

Defined Under Namespace

Modules: Markup, Processor, Processors Classes: Application, BuildError, Configure, ElementSyntaxError, Error, Execute, LocationError, NoFileError, NodeError, PairError, ParseError, Parser, PathSet, ProcessorBuildError, ProcessorError, ProcessorNotImplementedError, ScanError, Scanner, VerificationBuildError

Constant Summary collapse

VERSION =

The running version of Brandish.

Returns:

  • (::String)
"0.1.3"

Class Method Summary collapse

Class Method Details

.self.configuration { ... } ⇒ Configure .self.configurationConfigure

Overloads:



26
27
28
29
30
31
32
33
# File 'lib/brandish.rb', line 26

def self.configuration(root = ::Dir.pwd)
  if block_given?
    @configuration ||= Configure.new(::File.expand_path(root))
    Configure::DSL.call(@configuration, &::Proc.new)
  else
    @configuration
  end
end

.configure { ... } ⇒ Configure

Sets the configuration object to a new Configure object, and builds it using Brandish::Configure::DSL.call. The configuration object is then returned.

Yields:

Returns:



40
41
42
# File 'lib/brandish.rb', line 40

def self.configure(&b)
  configuration(&b)
end

.reset_configurationvoid

This method returns an undefined value.

Resets the configuration object, so that it can be redefined. This is used to clear out the previous configuration.



48
49
50
# File 'lib/brandish.rb', line 48

def self.reset_configuration
  @configuration = nil
end