summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@skas.io>2024-10-25 13:32:15 +1100
committerSzymon Szukalski <szymon@skas.io>2024-10-25 13:32:15 +1100
commitdcadb5e738774a133f980cd07ba2d617c6d6656d (patch)
tree319dc95bfc5c62f3c995294d9e1e97cc13bcf89a /README.md
parent5fe552de8f8e8f7bd4747d75a2a1da92e67bdc4a (diff)
Handle singular form of SIBLINGS action.
- Updated tests to handle `SIBLING` action - Added assumptions to README
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index f681386..97c89f7 100644
--- a/README.md
+++ b/README.md
@@ -18,12 +18,13 @@ Example: `./ruby family_tree.rb /path/to/actions.txt`
**Supported Genders**
- `MALE`
-- `FEMAL`
+- `FEMALE`
**Supported Relationship Types**
- `MOTHER`
- `FATHER`
+- `SIBLING`
- `SIBLINGS`
- `CHILD`
- `DAUGHTER`
@@ -73,6 +74,13 @@ Based on the family tree, here are the expected outputs for commoon scenarios:
| `GET_RELATIONSHIP "King Arthur" "Pets"` | _no output_ | Invalid relationship type |
| `GET_RELATIONSHIP "King Arthur"` | _no output_ | Invalid number of arguments |
+## Assumptions
+
+- Both quoted and unquoted action parameters are supported, as seen in the provided examples.
+- Invalid actions and relationships produce no output, as this behavior was not documented. This prevents failures in a test harness due to unexpected output.
+- While most relationship types are singular, `SIBLINGS` is kept plural to ensure compatibility with existing tests.
+- Although relationship types are defined as singular, the `GET_RELATIONSHIP` action may return multiple values. This makes sense since it queries for all individuals related by the specified type.
+
## Approach
The implementation of this project follows a structured approach: