Sha256: 7ca271ee6dbec1264cc926f8204683d306e89d4acaa798767f42f0720913d7ad
Contents?: true
Size: 373 Bytes
Versions: 105
Compression:
Stored size: 373 Bytes
Contents
class Jets::Commands::Runner def self.run(code) if code =~ %r{^file://} path = code.sub('file://', '') full_path = "#{Jets.root}/#{path}" if File.exist?(full_path) code = IO.read(full_path) else puts "ERROR: file not found at #{full_path}".color(:red) exit 1 end end eval(code) # inline script end end
Version data entries
105 entries across 105 versions & 3 rubygems