Sha256: 04b159973d5c52ce6ed0c1ea9fc8bd7c598db72be701fc6aebf3309faf0e03c3
Contents?: true
Size: 792 Bytes
Versions: 2
Compression:
Stored size: 792 Bytes
Contents
module Kharon module Errors # Standard exception raised in case the exceptions are used, and there is an error in the validation. # @author Vincent Courtois <courtois.vincent@outlook.com> class Validation < Exception # @!attribute [rw] error_hash # @return [Hash] the description of the encountered error as a Hash. attr_accessor :error_hash # Constructor of the class. # @param [Hash] error_hash the description of the encountered error as a Hash. def initialize(error_hash) @error_hash = error_hash end # Generates a JSON version of the encountered error description hash. # @return [String] the JSON representation of an error. def message JSON.generate(error_hash) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kharon-0.5.1 | lib/kharon/errors/validation.rb |
kharon-0.5.0 | lib/kharon/errors/validation.rb |