Description:
This pull request introduces the following changes:
Creates a Game class in a separate .rb file with properties defined and set up in the constructor method.
Creates an Author class in a separate .rb file with properties defined and set up in the constructor method and establishes an association with the Item class.
Implements the add_item method in the Author class, allowing it to add an instance of the Item class to the collection of items and set itself as a property of the item.
Implements the can_be_archived? method in the Game class, which overrides the parent class's method to return true if the parent's method returns true and if the last_played_at is older than 2 years; otherwise, it returns false.
Adds unit tests.
Provides options to list games, list all authors, and add a game, with data preservation using .json files.
Description: This pull request introduces the following changes:
add_item
method in the Author class, allowing it to add an instance of the Item class to the collection of items and set itself as a property of the item.can_be_archived?
method in the Game class, which overrides the parent class's method to return true if the parent's method returns true and if the last_played_at is older than 2 years; otherwise, it returns false.