Sha256: 74462220da5b64e1672762e05bec46adb785091f2273deab74bf4f73fbd88a5d
Contents?: true
Size: 568 Bytes
Versions: 2
Compression:
Stored size: 568 Bytes
Contents
module Lev class Error attr_accessor :code attr_accessor :data attr_accessor :kind attr_accessor :message # The inputs related to this error attr_accessor :offending_inputs def initialize(args={}) raise ArgumentError, "must supply a :code" if args[:code].blank? self.code = args[:code] self.data = args[:data] self.kind = args[:kind] self.message = args[:message] self.offending_inputs = args[:offending_inputs] end def translate ErrorTranslator.translate(self) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lev-7.0.2 | lib/lev/error.rb |
lev-7.0.1 | lib/lev/error.rb |