Method: Lev::Error#initialize
- Defined in:
- lib/lev/error.rb
#initialize(args = {}) ⇒ Error
Returns a new instance of Error.
13 14 15 16 17 18 19 20 21 |
# File 'lib/lev/error.rb', line 13 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. = args[:message] self.offending_inputs = args[:offending_inputs] end |