lib/kindergarten/exceptions.rb in kindergarten-0.1.0 vs lib/kindergarten/exceptions.rb in kindergarten-0.1.1
- old
+ new
@@ -46,9 +46,20 @@
def to_s
"The module #{@perimeter.name} does not have a purpose."
end
end
+ class RestrictedMethodError < ArgumentError
+ def initialize(perimeter, method)
+ @perimeter = perimeter
+ @method = method
+ end
+
+ def to_s
+ "You exposed '#{method}' on the #{perimeter}, but that is a restricted method"
+ end
+ end
+
# Signals bad sandbox method implementation
class Unguarded < SecurityError; end
end
end