Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/item class #26

Merged
merged 3 commits into from
Sep 11, 2023
Merged

Feature/item class #26

merged 3 commits into from
Sep 11, 2023

Conversation

CesarHerr
Copy link
Collaborator

  • Create Item class in a separate .rb file.

  • All Item class properties visible in the diagram should be defined and set up in the constructor method. Exception: properties for the 1-to-many relationships should NOT be set in the constructor method. Instead, they should have a custom setter method created.

  • Add all methods visible in the diagram.

  • Implement methods:

  • can_be_archived?() in the Item class.

  • should return true if published_date is older than 10 years.

  • Otherwise, it should return false.

  • move_to_archive() in the Item class.

  • should reuse can_be_archived?() method.

  • should change the archived property to true if the result of the can_be_archived?() method is true.

  • should do nothing if the result of the can_be_archived?() method is false.

@CesarHerr CesarHerr added the enhancement New feature or request label Sep 11, 2023
Copy link
Collaborator

@Zven94 Zven94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status: Approved 🟢 🥇 💯

success

Hey @AndreaM2429 [N°1], @CesarHerr [N°2] 👋

Great work on implementing the Item Class and its metohds. Your task are complete. 😊
There is nothing else to say about your project: lets merge it 👍

Highlights 🥇

✔️ Descriptive Pull Request Title & info
✔️ Linters running
✔️ Item class in another file and all properties defined
✔️ can_be_archived?() Method correctly implemented
✔️ move_to_archive() Method correctly implemented

Optional

All the changes with optional tags are not crucial enough to prevent you from getting the approval but we highly recommend to students that they should take these changes into consideration.

Happy coding! 👏 👏 👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Please, remember to tag me in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@CesarHerr CesarHerr merged commit 793eb9b into develop Sep 11, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.5pt] Create Item class - Group task [2pt] Item class methods - Group task
3 participants