Class: Giter8::Renderer::Executor
- Inherits:
-
Object
- Object
- Giter8::Renderer::Executor
- Defined in:
- lib/giter8/renderer/executor.rb
Overview
Executor implements methods for rendering remplates
Instance Method Summary collapse
-
#exec(tree) ⇒ Object
Returns a string after rendering the provided AST tree with the Pairs provided upon initialisation.
-
#initialize(props) ⇒ Executor
constructor
Initializes the executor with a given Pairs set.
Constructor Details
#initialize(props) ⇒ Executor
Initializes the executor with a given Pairs set
9 10 11 |
# File 'lib/giter8/renderer/executor.rb', line 9 def initialize(props) @props = props end |
Instance Method Details
#exec(tree) ⇒ Object
Returns a string after rendering the provided AST tree with the Pairs provided upon initialisation
15 16 17 18 19 |
# File 'lib/giter8/renderer/executor.rb', line 15 def exec(tree) result = StringIO.new exec_tree(tree, result) result.string end |