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

Version Path
camping-3.2.6 lib/camping/campguide.rb
camping-3.2.5 lib/camping/campguide.rb
camping-3.2.4 lib/camping/campguide.rb
camping-3.2.3 lib/camping/campguide.rb
camping-3.2.2 lib/camping/campguide.rb
camping-3.2.1 lib/camping/campguide.rb
camping-3.2.0 lib/camping/campguide.rb
camping-3.1.3 lib/camping/campguide.rb
camping-3.1.2 lib/camping/campguide.rb
camping-3.1.0 lib/camping/campguide.rb