Module: Kharon
- Defined in:
- lib/kharon.rb,
lib/kharon/errors.rb,
lib/kharon/version.rb,
lib/kharon/handlers.rb,
lib/kharon/validator.rb,
lib/kharon/errors/validation.rb,
lib/kharon/handlers/messages.rb,
lib/kharon/handlers/exceptions.rb
Overview
Main module of the application.
Defined Under Namespace
Modules: Errors, Handlers Classes: Validator
Constant Summary
- VERSION =
Current version of the application.
"1.1.0"
- @@use_exceptions =
true
Class Method Summary (collapse)
-
+ (Object) errors_handler
Returns the current error handler, defined by if you use exceptions or not.
-
+ (Object) use_exceptions(use = true)
Configuration method used to tell the module if it uses exceptions or stores error messages.
Class Method Details
+ (Object) errors_handler
Returns the current error handler, defined by if you use exceptions or not.
17 18 19 |
# File 'lib/kharon.rb', line 17 def self.errors_handler @@use_exceptions ? Kharon::Handlers::Exceptions.instance : Kharon::Handlers::Messages.new end |
+ (Object) use_exceptions(use = true)
Configuration method used to tell the module if it uses exceptions or stores error messages.
11 12 13 |
# File 'lib/kharon.rb', line 11 def self.use_exceptions(use = true) @@use_exceptions = use end |