Sha256: ce401b30d66e4d42f287a5c192c24438ff1c2713d4b1f30262af02fabca93f0b
Contents?: true
Size: 388 Bytes
Versions: 35
Compression:
Stored size: 388 Bytes
Contents
class Jets::Commands::Runner def self.run(code) Jets.boot 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
35 entries across 35 versions & 2 rubygems