Class: RSchema::GenericSetSchema
- Inherits:
-
Struct
- Object
- Struct
- RSchema::GenericSetSchema
- Defined in:
- lib/rschema.rb
Instance Attribute Summary collapse
-
#subschema ⇒ Object
Returns the value of attribute subschema.
Instance Method Summary collapse
Instance Attribute Details
#subschema ⇒ Object
Returns the value of attribute subschema
177 178 179 |
# File 'lib/rschema.rb', line 177 def subschema @subschema end |
Instance Method Details
#schema_walk(value, mapper) ⇒ Object
178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/rschema.rb', line 178 def schema_walk(value, mapper) return RSchema::ErrorDetails.new(value, 'is not a Set') if not value.is_a?(Set) value.reduce(Set.new) do |accum, subvalue| subvalue_walked, error = RSchema.walk(subschema, subvalue, mapper) break error.extend_key_path('.values') if error accum << subvalue_walked accum end end |