lib/not_loaded.rb 🔗
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-class NotLoaded
- class NotLoadedError < StandardError; end
+class NotLoaded < BasicObject
+ class NotLoadedError < ::StandardError; end
def initialize(name)
@name = name
@@ -12,6 +12,6 @@ class NotLoaded
end
def method_missing(*)
- raise NotLoadedError, "#{@name} not loaded"
+ ::Kernel.raise NotLoadedError, "#{@name} not loaded"
end
end