Class: DHS::Problems::Nested::Errors

Inherits:
Errors
  • Object
show all
Includes:
Base
Defined in:
lib/dhs/problems/nested/errors.rb

Instance Attribute Summary

Attributes inherited from Errors

#message, #status_code

Attributes inherited from Base

#codes, #messages, #raw, #record

Instance Method Summary collapse

Methods included from Base

#nest, #reached_leaf?, #remove_scope, #translate_rails_to_api_scope

Methods inherited from Base

#[], #[]=, #add, #clear, #count, #each, #empty?, #get, #include?, #set, #size

Constructor Details

#initialize(errors, scope) ⇒ Errors

Returns a new instance of Errors.



8
9
10
11
12
13
# File 'lib/dhs/problems/nested/errors.rb', line 8

def initialize(errors, scope)
  @raw = errors
  @messages = nest(errors.messages, scope)
  @message = errors.message
  @scope = scope
end