Module: DslEvaluator
- Extended by:
- DslEvaluator, Memoist
- Includes:
- Printer::Concern
- Included in:
- DslEvaluator
- Defined in:
- lib/dsl_evaluator.rb,
lib/dsl_evaluator/app.rb,
lib/dsl_evaluator/logger.rb,
lib/dsl_evaluator/printer.rb,
lib/dsl_evaluator/version.rb,
lib/dsl_evaluator/autoloader.rb
Defined Under Namespace
Classes: App, Autoloader, Error, Logger, Printer
Constant Summary
collapse
- VERSION =
"0.3.2"
Instance Method Summary
collapse
#check_line_number!, #pretty_home, #pretty_path, #print_code
Instance Method Details
#config ⇒ Object
43
44
45
|
# File 'lib/dsl_evaluator.rb', line 43
def config
App.instance.config
end
|
39
40
41
|
# File 'lib/dsl_evaluator.rb', line 39
def configure(&block)
App.instance.configure(&block)
end
|
#evaluate_file(path) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/dsl_evaluator.rb', line 18
def evaluate_file(path)
return unless path && File.file?(path)
instance_eval(IO.read(path), path)
rescue Exception => e
Printer.new(e).print
case config.on_exception
when :rescue
when :exit
exit 1
else raise
end
end
|
#logger ⇒ Object
35
36
37
|
# File 'lib/dsl_evaluator.rb', line 35
def logger
config.logger
end
|