Class: DHS::Problems::Nested::Warnings

Inherits:
Warnings show all
Includes:
Base
Defined in:
lib/dhs/problems/nested/warnings.rb

Instance Attribute Summary

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(warnings, scope) ⇒ Warnings

Returns a new instance of Warnings.



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

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