Module: Suma::LinkValidator::Step::SchemaElementLookup
- Defined in:
- lib/suma/link_validator/step.rb
Overview
Lookup helper shared across Step classes that need to resolve a named schema element (used by Type for underlying-type resolution). Lives behind its own module so Steps don't reach into LinkValidator's private methods.
Class Method Summary collapse
Class Method Details
.find(schema, name) ⇒ Object
118 119 120 121 122 123 124 |
# File 'lib/suma/link_validator/step.rb', line 118 def self.find(schema, name) collections(schema).each do |collection| element = collection&.find { |e| e.id.downcase == name.downcase } return element if element end nil end |