Sha256: 16ef1e728757d1e1497d41e94cd385d3e1fa5e6a35ae9fc5addb452e792280ab
Contents?: true
Size: 395 Bytes
Versions: 11
Compression:
Stored size: 395 Bytes
Contents
module BetterErrors module REPL class Basic def initialize(binding) @binding = binding end def send_input(str) [execute(str), ">>"] end private def execute(str) "=> #{@binding.eval(str).inspect}\n" rescue Exception => e "!! #{e.inspect rescue e.class.to_s rescue "Exception"}\n" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems