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.
64 65 66 67 68 69 70 |
# File 'lib/yard/cli/command.rb', line 64 def load_script(file) return if YARD::Config.[:safe_mode] require(file.gsub(/\.rb$/, '')) rescue LoadError => load_exception log.error "The file `#{file}' could not be loaded:\n#{load_exception}" exit end |