summaryrefslogtreecommitdiff
path: root/lib/family_tree.rb
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@skas.io>2024-10-24 13:28:16 +1100
committerSzymon Szukalski <szymon@skas.io>2024-10-24 13:28:16 +1100
commit55475178a8c0e610103e37027cc0a7a387d72f91 (patch)
tree8ff4f02905758dfd9ae658d7e312877fc7f0c4ac /lib/family_tree.rb
parent3824dda1f184158c8946f02a4f2d533a17e95cd4 (diff)
Define FamilyTree
- Implemented basic FamilyTree which will hold all the people and perform actions on them - Updated the FamilyTree Manager to create an instance of the FamilyTree - Updated the FamilyTreeManager to call the add_child and query_hierarchy methods on the FamilyTree - Update tests
Diffstat (limited to 'lib/family_tree.rb')
-rw-r--r--lib/family_tree.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/family_tree.rb b/lib/family_tree.rb
new file mode 100644
index 0000000..934d32e
--- /dev/null
+++ b/lib/family_tree.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class FamilyTree
+ def initialize
+ @people = []
+ end
+
+ def add_child(*params)
+ puts "Adding Child with params: #{params.join(', ')}"
+ end
+
+ def query_hierarchy(*params)
+ puts "Querying Hierarcy with params: #{params.join(', ')}"
+ end
+end