Method: Cfer::Block#build_from_string

Defined in:
lib/cfer/block.rb

#build_from_string(*args, str, file) ⇒ Object

Evaluates a DSL from a Ruby string

Parameters:

  • Extra arguments to be passed into the block

  • The Cfer source template to evaluate

  • The file that will be reported in any error messages



21
22
23
24
25
26
# File 'lib/cfer/block.rb', line 21

def build_from_string(*args, str, file)
  build_from_block(*args) do
    instance_eval str, file
  end
  self
end