Class: Geni::Profile::ImmediateFamily
- Inherits:
-
Object
- Object
- Geni::Profile::ImmediateFamily
- Defined in:
- lib/geni/profile/immediate_family.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#focus ⇒ Object
readonly
Returns the value of attribute focus.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(params) ⇒ ImmediateFamily
constructor
A new instance of ImmediateFamily.
- #parents ⇒ Object
- #partners ⇒ Object
- #siblings ⇒ Object
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
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/geni/profile/immediate_family.rb', line 4 def client @client end |
#focus ⇒ Object (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
#children ⇒ Object
22 23 24 |
# File 'lib/geni/profile/immediate_family.rb', line 22 def children @children ||= profiles(walk(focus_node, ['partner', 'child'])) end |
#parents ⇒ Object
14 15 16 |
# File 'lib/geni/profile/immediate_family.rb', line 14 def parents @parents ||= profiles(walk(focus_node, ['child', 'partner'])) end |
#partners ⇒ Object
18 19 20 |
# File 'lib/geni/profile/immediate_family.rb', line 18 def partners @partners ||= profiles(walk(focus_node, ['partner', 'partner'])) end |
#siblings ⇒ Object
26 27 28 |
# File 'lib/geni/profile/immediate_family.rb', line 26 def siblings @siblings ||= profiles(walk(focus_node, ['child', 'child'])) end |