Class: FamilySearch::Gedcomx::GraphParents

Inherits:
Object
  • Object
show all
Defined in:
lib/familysearch/gedcomx/graph_parents.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capr, graph) ⇒ GraphParents

Returns a new instance of GraphParents.



6
7
8
9
10
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 6

def initialize(capr, graph)
  # childAndParentsRelationship
  self.capr = capr
  self.graph = graph
end

Instance Attribute Details

#caprObject

Returns the value of attribute capr.



4
5
6
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 4

def capr
  @capr
end

#graphObject

Returns the value of attribute graph.



5
6
7
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 5

def graph
  @graph
end

Instance Method Details

#childObject



20
21
22
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 20

def child
  self.graph.person(self.capr.child.resourceId) if self.capr.child
end

#fatherObject



12
13
14
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 12

def father
  self.graph.person(self.capr.father.resourceId) if self.capr.father
end

#motherObject



16
17
18
# File 'lib/familysearch/gedcomx/graph_parents.rb', line 16

def mother
  self.graph.person(self.capr.mother.resourceId) if self.capr.mother
end