From dcadb5e738774a133f980cd07ba2d617c6d6656d Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Fri, 25 Oct 2024 13:32:15 +1100 Subject: Handle singular form of SIBLINGS action. - Updated tests to handle `SIBLING` action - Added assumptions to README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'README.md') 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: -- cgit v1.2.3