Class: Pieces::RouteCompiler
- Inherits:
-
Object
- Object
- Pieces::RouteCompiler
- Includes:
- Configurable
- Defined in:
- lib/pieces/route_compiler.rb
Defined Under Namespace
Classes: ViewModel
Instance Attribute Summary
Attributes included from Configurable
Instance Method Summary collapse
- #compile(files, name, route) ⇒ Object
-
#initialize(config) ⇒ RouteCompiler
constructor
A new instance of RouteCompiler.
Constructor Details
#initialize(config) ⇒ RouteCompiler
Returns a new instance of RouteCompiler.
7 8 9 |
# File 'lib/pieces/route_compiler.rb', line 7 def initialize(config) @config = config end |
Instance Method Details
#compile(files, name, route) ⇒ Object
11 12 13 |
# File 'lib/pieces/route_compiler.rb', line 11 def compile(files, name, route) files.merge("#{name}.html" => { contents: yield_pieces(route), type: 'html' }) end |