Class: FamilySearch::Gedcomx::NameForm

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

Instance Method Summary collapse

Methods included from SuperCoercion

included

Instance Method Details

#given_nameObject



333
334
335
336
337
# File 'lib/familysearch/gedcomx/data_model.rb', line 333

def given_name
  return '' if parts.nil?
  given_piece = parts.find{|p|p.type == 'http://gedcomx.org/Given'}
  given_piece ? given_piece.value : ''
end

#surnameObject



327
328
329
330
331
# File 'lib/familysearch/gedcomx/data_model.rb', line 327

def surname
  return '' if parts.nil?
  surname_piece = parts.find{|p|p.type == 'http://gedcomx.org/Surname'}
  surname_piece ? surname_piece.value : ''
end