Sha256: 8e0a0332f4cea83828ea72ed0820a09055d9f9fe9a14e9812cf2174a99db5308
Contents?: true
Size: 606 Bytes
Versions: 10
Compression:
Stored size: 606 Bytes
Contents
# Campguide is a small helper to map common errors in a Camping project to a quick resolution. module Campguide Errors = {"wrong number of arguments (given 3, expected 0)" => "ArgumentError. This is sometimes caused when you try to send a request to a controller when a camping app hasn't made camp yet. make certain to call Camping.make_camp to set up your apps."} class << self # accepts string error messages and tries to match them with better explanations of the error. def make_sense(error_message) message = Errors[error_message] puts message ? message : error_message end end end
Version data entries
10 entries across 10 versions & 1 rubygems