Module: Babl::Operators::Source::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/source.rb
Instance Method Summary collapse
-
#source(*args, &block) ⇒ Object
Parse BABL source into a Template.
Instance Method Details
#source(*args, &block) ⇒ Object
Parse BABL source into a Template
8 9 10 11 12 13 |
# File 'lib/babl/operators/source.rb', line 8 def source(*args, &block) raise Errors::InvalidTemplate, 'source() expects a block xor a string' unless args.empty? ^ block.nil? block ||= proc { instance_eval(*args) } call Utils::DslProxy.eval(unscoped, &block) end |