module Terror
Public Instance Methods
const_missing(name)
click to toggle source
Calls superclass method
# File lib/terror.rb, line 6 def const_missing(name) return super unless name.to_s.end_with?("Error") const_set(name, Class.new(StandardError)) end
errors(from: ::StandardError, &blk)
click to toggle source
# File lib/terror.rb, line 2 def errors(from: ::StandardError, &blk) ErrorBuilder.new(self, from).instance_exec(&blk) end