Class: FamilySearch::Gedcomx::Person

Inherits:
Subject show all
Defined in:
lib/familysearch/gedcomx/data_model.rb

Direct Known Subclasses

GraphPerson

Instance Method Summary collapse

Methods included from SuperCoercion

included

Instance Method Details

#birthObject



393
394
395
# File 'lib/familysearch/gedcomx/data_model.rb', line 393

def birth
  facts.find{|f|f.type == "http://gedcomx.org/Birth"} if facts
end

#burialObject



405
406
407
# File 'lib/familysearch/gedcomx/data_model.rb', line 405

def burial
  facts.find{|f|f.type == "http://gedcomx.org/Burial"} if facts
end

#christeningObject



401
402
403
# File 'lib/familysearch/gedcomx/data_model.rb', line 401

def christening
  facts.find{|f|f.type == "http://gedcomx.org/Christening"} if facts
end

#deathObject



397
398
399
# File 'lib/familysearch/gedcomx/data_model.rb', line 397

def death
  facts.find{|f|f.type == "http://gedcomx.org/Death"} if facts
end

#full_nameObject



381
382
383
# File 'lib/familysearch/gedcomx/data_model.rb', line 381

def full_name
  (name) ? name.fullText : ''
end

#given_nameObject



389
390
391
# File 'lib/familysearch/gedcomx/data_model.rb', line 389

def given_name
  (name) ? name.given_name : ''
end

#nameObject

Returns the first name in the names array



377
378
379
# File 'lib/familysearch/gedcomx/data_model.rb', line 377

def name
  names[0] if names
end

#surnameObject



385
386
387
# File 'lib/familysearch/gedcomx/data_model.rb', line 385

def surname
  (name) ? name.surname : ''
end