Class: Pupa::Person
- Inherits:
-
Object
- Object
- Pupa::Person
- Includes:
- Concerns::Contactable, Concerns::Identifiable, Concerns::Linkable, Concerns::Nameable, Concerns::Sourceable, Concerns::Timestamps, Model
- Defined in:
- lib/pupa/models/person.rb
Overview
A real person, alive or dead.
Instance Attribute Summary collapse
-
#additional_name ⇒ Object
Returns the value of attribute additional_name.
-
#biography ⇒ Object
Returns the value of attribute biography.
-
#birth_date ⇒ Object
Returns the value of attribute birth_date.
-
#death_date ⇒ Object
Returns the value of attribute death_date.
-
#email ⇒ Object
Returns the value of attribute email.
-
#family_name ⇒ Object
Returns the value of attribute family_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#given_name ⇒ Object
Returns the value of attribute given_name.
-
#honorific_prefix ⇒ Object
Returns the value of attribute honorific_prefix.
-
#honorific_suffix ⇒ Object
Returns the value of attribute honorific_suffix.
-
#image ⇒ Object
Returns the value of attribute image.
-
#name ⇒ Object
Returns the value of attribute name.
-
#national_identity ⇒ Object
Returns the value of attribute national_identity.
-
#patronymic_name ⇒ Object
Returns the value of attribute patronymic_name.
-
#sort_name ⇒ Object
Returns the value of attribute sort_name.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
- #fingerprint ⇒ Object
-
#to_s ⇒ String
Returns the person's name.
Methods included from Concerns::Linkable
#add_link, #initialize, #links=
Methods included from Concerns::Contactable
#add_contact_detail, #contact_details=, #initialize
Methods included from Concerns::Identifiable
#add_identifier, #identifiers=, #initialize
Methods included from Concerns::Nameable
#add_name, #initialize, #other_names=
Methods included from Concerns::Sourceable
#add_source, #initialize, #sources=
Methods included from Model
#==, #[], #[]=, #_id=, #add_extra, #extras=, #foreign_properties, #initialize, #to_h, #validate!
Instance Attribute Details
#additional_name ⇒ Object
Returns the value of attribute additional_name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def additional_name @additional_name end |
#biography ⇒ Object
Returns the value of attribute biography.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def biography @biography end |
#birth_date ⇒ Object
Returns the value of attribute birth_date.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def birth_date @birth_date end |
#death_date ⇒ Object
Returns the value of attribute death_date.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def death_date @death_date end |
#email ⇒ Object
Returns the value of attribute email.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def email @email end |
#family_name ⇒ Object
Returns the value of attribute family_name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def family_name @family_name end |
#gender ⇒ Object
Returns the value of attribute gender.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def gender @gender end |
#given_name ⇒ Object
Returns the value of attribute given_name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def given_name @given_name end |
#honorific_prefix ⇒ Object
Returns the value of attribute honorific_prefix.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def honorific_prefix @honorific_prefix end |
#honorific_suffix ⇒ Object
Returns the value of attribute honorific_suffix.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def honorific_suffix @honorific_suffix end |
#image ⇒ Object
Returns the value of attribute image.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def image @image end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def name @name end |
#national_identity ⇒ Object
Returns the value of attribute national_identity.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def national_identity @national_identity end |
#patronymic_name ⇒ Object
Returns the value of attribute patronymic_name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def patronymic_name @patronymic_name end |
#sort_name ⇒ Object
Returns the value of attribute sort_name.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def sort_name @sort_name end |
#summary ⇒ Object
Returns the value of attribute summary.
15 16 17 |
# File 'lib/pupa/models/person.rb', line 15 def summary @summary end |
Instance Method Details
#fingerprint ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/pupa/models/person.rb', line 29 def fingerprint if name { '$or' => [ {'name' => name}, {'other_names.name' => name}, ], } else {} end end |
#to_s ⇒ String
Returns the person's name.
23 24 25 |
# File 'lib/pupa/models/person.rb', line 23 def to_s name end |