Module: Blur::Evaluable
Instance Method Summary collapse
-
#evaluate_source_file(path) ⇒ Object
Evaluate the contents of the input file in the context of
self
.
Instance Method Details
#evaluate_source_file(path) ⇒ Object
Evaluate the contents of the input file in the context of self
.
6 7 8 9 10 11 |
# File 'library/blur/evaluable.rb', line 6 def evaluate_source_file path instance_eval File.read(path), File.basename(path), 0 @__evaluated = true rescue Exception => exception puts "#{exception. ^ :bold} on line #{exception.line.to_s ^ :bold}" end |