Method: Scimitar::Resources::Base.find_attribute

Defined in:
app/models/scimitar/resources/base.rb

.find_attribute(*path) ⇒ Object

Calls to Scimitar::Schema::Base::find_attribute for each of the schemas in ::schemas, in order returned (so main schema would be first, then any extended schemas searched next). Returns the first match found, or nil.

See Scimitar::Schema::Base::find_attribute for details on parameters, more about the return value and other general information.



134
135
136
137
138
139
140
141
142
143
# File 'app/models/scimitar/resources/base.rb', line 134

def self.find_attribute(*path)
  found_attribute = nil

  self.schemas.each do | schema |
    found_attribute = schema.find_attribute(*path)
    break unless found_attribute.nil?
  end

  return found_attribute
end