Module: Landline::DSL::ProbeConstructors
- Included in:
- App, ProcessorContext, TemplateContext
- Defined in:
- lib/landline/dsl/constructors_probe.rb
Overview
Probe (and subclasses) DSL construct
Instance Method Summary collapse
-
#erb(input, vars = {}) ⇒ Object
(in Landline::Probe context) Create a new erb template.
-
#erubi(input, vars = {}, freeze: true, capture: false) ⇒ Object
(in Landline::Probe context) Create a new erb template using Erubi engine.
Instance Method Details
#erb(input, vars = {}) ⇒ Object
(in Landline::Probe context) Create a new erb template
10 11 12 13 14 15 |
# File 'lib/landline/dsl/constructors_probe.rb', line 10 def erb(input, vars = {}) Landline::Templates::ERB.new(input, vars, parent: @origin, filename: caller_locations[0].path) end |
#erubi(input, vars = {}, freeze: true, capture: false) ⇒ Object
(in Landline::Probe context) Create a new erb template using Erubi engine
22 23 24 25 26 27 28 29 |
# File 'lib/landline/dsl/constructors_probe.rb', line 22 def erubi(input, vars = {}, freeze: true, capture: false) Landline::Templates::Erubi.new(input, vars, parent: @origin, freeze: freeze, capture: capture, filename: caller_locations[0].path) end |