class Pupa::Person

A real person, alive or dead.

Attributes

additional_name[RW]
biography[RW]
birth_date[RW]
death_date[RW]
email[RW]
family_name[RW]
gender[RW]
given_name[RW]
honorific_prefix[RW]
honorific_suffix[RW]
image[RW]
name[RW]
national_identity[RW]
patronymic_name[RW]
sort_name[RW]
summary[RW]

Public Instance Methods

fingerprint() click to toggle source

@todo This will obviously need to be scoped as in Python Pupa, to a

jurisdiction, post, etc.
# File lib/pupa/models/person.rb, line 29
def fingerprint
  if name
    {
      '$or' => [
        {'name' => name},
        {'other_names.name' => name},
      ],
    }
  else
    {}
  end
end
to_s() click to toggle source

Returns the person’s name.

@return [String] the person’s name

# File lib/pupa/models/person.rb, line 23
def to_s
  name
end