Method: Template::Spec#from_string

Defined in:
lib/template/spec.rb

#from_string(string, path) ⇒ Object



86
87
88
89
90
91
92
93
# File 'lib/template/spec.rb', line 86

def from_string(string, path)
  begin
    eval(string, nil, path)
  rescue Exception => e
    raise "Error evaluating spec: #{File.basename(path)}: #{e.message}\n  #{e.backtrace.join("\n  ")}"
  end
  validate_spec
end