Class: Ecoportal::API::V1::PersonDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/eco/api/common/version_patches/ecoportal_api/external_details.rb

Instance Method Summary collapse

Instance Method Details

#key?(id) ⇒ Boolean

Checks if an id or alt_id exists

Parameters:

  • id (String)

    the id or the alt_id of the target field.

Returns:

  • (Boolean)

    true if it exists, false otherwise



8
9
10
11
# File 'lib/eco/api/common/version_patches/ecoportal_api/external_details.rb', line 8

def key?(id)
  @fields_by_id or index_fields
  @fields_by_id.key?(id) || @fields_by_alt_id.key?(id)
end