Module: Blur::Evaluable

Included in:
Extension, Script
Defined in:
library/blur/evaluable.rb

Instance Method Summary collapse

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.message ^ :bold} on line #{exception.line.to_s ^ :bold}"
end