Method: YARD::CLI::Command#load_script
- Defined in:
- lib/yard/cli/command.rb
#load_script(file) ⇒ Object (protected)
Loads a Ruby script. If Config.options[:safe_mode]
is enabled, this method will do nothing.
67 68 69 70 71 72 73 |
# File 'lib/yard/cli/command.rb', line 67 def load_script(file) return if YARD::Config.[:safe_mode] load(file) rescue LoadError => load_exception log.error "The file `#{file}' could not be loaded:\n#{load_exception}" exit end |