Commit 8a4bb63

mokha <mokha@cisco.com>
2019-01-30 00:27:15
implement each on Attribute
1 parent bf9ccd8
Changed files (2)
lib/scim/kit/v2/attributable.rb
@@ -43,6 +43,12 @@ module Scim
           end
         end
 
+        def each
+          dynamic_attributes.each do |_name, attribute|
+            yield attribute
+          end
+        end
+
         private
 
         def attribute_for(name)
lib/scim/kit/v2/attribute.rb
@@ -73,7 +73,7 @@ module Scim
         end
 
         def validate_complex
-          dynamic_attributes.each do |key, attribute|
+          each do |attribute|
             errors.copy!(attribute.errors) unless attribute.valid?
           end
         end