Class: Geni::Profile::ImmediateFamily

Inherits:
Object
  • Object
show all
Defined in:
lib/geni/profile/immediate_family.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ ImmediateFamily

Returns a new instance of ImmediateFamily.



6
7
8
9
10
11
12
# File 'lib/geni/profile/immediate_family.rb', line 6

def initialize(params)
  @client = params[:client]

  params[:attrs].each_pair do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/geni/profile/immediate_family.rb', line 4

def client
  @client
end

#focusObject (readonly)

Returns the value of attribute focus.



4
5
6
# File 'lib/geni/profile/immediate_family.rb', line 4

def focus
  @focus
end

Instance Method Details

#childrenObject



22
23
24
# File 'lib/geni/profile/immediate_family.rb', line 22

def children
  @children ||= profiles(walk(focus_node, ['partner', 'child']))
end

#parentsObject



14
15
16
# File 'lib/geni/profile/immediate_family.rb', line 14

def parents
  @parents ||= profiles(walk(focus_node, ['child', 'partner']))
end

#partnersObject



18
19
20
# File 'lib/geni/profile/immediate_family.rb', line 18

def partners
  @partners ||= profiles(walk(focus_node, ['partner', 'partner']))
end

#siblingsObject



26
27
28
# File 'lib/geni/profile/immediate_family.rb', line 26

def siblings
  @siblings ||= profiles(walk(focus_node, ['child', 'child']))
end