module BetterErrors::REPL
@private
Constants
- PROVIDERS
Public Class Methods
detect()
click to toggle source
# File lib/better_errors/repl.rb, line 17 def self.detect PROVIDERS.find { |prov| test_provider prov } end
provider()
click to toggle source
# File lib/better_errors/repl.rb, line 9 def self.provider @provider ||= const_get detect[:const] end
provider=(prov)
click to toggle source
# File lib/better_errors/repl.rb, line 13 def self.provider=(prov) @provider = prov end
test_provider(provider)
click to toggle source
# File lib/better_errors/repl.rb, line 23 def self.test_provider(provider) # We must load this file instead of `require`ing it, since during our tests we want the file # to be reloaded. In practice, this will only be called once, so `require` is not necessary. load "#{provider[:impl]}.rb" true rescue LoadError false end