Module: Cuprum::Cli::Files::Engines
- Parent Namespace
- Cuprum::Cli::Files
- Defined In
- lib/cuprum/cli/files/engines.rb
Table Of Contents
Overview
Namespace for commands that process raw templates into file contents.
Back To Top
Defined Under Namespace
- Classes
- RenderErb,
RenderTemplate
Back To Top
Constants
ERB
= 'cuprum.cli.files.engines.erb'
Identifier for ERB files.
Back To Top
Class Methods
.fetch(engine) => Cuprum::Command
.fetch(engine, default) => Cuprum::Command
.fetch(engine) { |engine| } => Cuprum::Command
Overloads
.fetch(engine) => Cuprum::Command
Retrieves the render command for the given engine.
Parameters
- engine (String) — the engine identifier.
Returns
- (Cuprum::Command) — the render command for the engine.
Raises
- (KeyError) — if there is no matching engine.
.fetch(engine, default) => Cuprum::Command
Retrieves the render command for the given engine.
Parameters
- engine (String) — the engine identifier.
- default (Cuprum::Command) — the command to return if there is no
matching engine.
Returns
- (Cuprum::Command) — the render command for the engine.
.fetch(engine) { |engine| } => Cuprum::Command
Retrieves the render command for the given engine.
If there is no matching engine. calls the block with the given engine.
Parameters
- engine (String) — the engine identifier.
Yield Parameters
- engine (String) — the engine identifier.
Yield Returns
- (Cuprum::Command) — the command to return if there is no
matching engine.
Returns
- (Cuprum::Command) — the render command for the engine.
.register(engine, render_command) => void
Registers a render command for the specified engine.
Parameters
- engine (String) — the engine identifier.
- render_command (Cuprum::Command) — the render command for the
engine.
Returns
Back To Top
Back to
Documentation |
Reference
|
Cuprum
|
Cuprum::Cli
|
Cuprum::Cli::Files