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

[2pt] Create Item class in a .rb file (GROUP TASK) #4

Closed
VitorGuedesMadeira opened this issue Oct 9, 2022 · 0 comments · Fixed by #20
Closed

[2pt] Create Item class in a .rb file (GROUP TASK) #4

VitorGuedesMadeira opened this issue Oct 9, 2022 · 0 comments · Fixed by #20

Comments

@VitorGuedesMadeira
Copy link
Owner

VitorGuedesMadeira commented Oct 9, 2022

  • 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

@diegoyon diegoyon changed the title [Xpt] Title [1pt] Create Item class in a .rb file Oct 10, 2022
@diegoyon diegoyon changed the title [1pt] Create Item class in a .rb file [1pt] Create Item class in a .rb file (GROUP TASK) Oct 10, 2022
@diegoyon diegoyon changed the title [1pt] Create Item class in a .rb file (GROUP TASK) [2pt] Create Item class in a .rb file (GROUP TASK) Oct 10, 2022
@diegoyon diegoyon moved this from To do to In progress in [COPY] [TEMPLATE] Ruby Group Capstone Project Oct 10, 2022
@diegoyon diegoyon moved this from In progress to In review in [COPY] [TEMPLATE] Ruby Group Capstone Project Oct 10, 2022
@VitorGuedesMadeira VitorGuedesMadeira added the good first issue Good for newcomers label Oct 10, 2022
@diegoyon diegoyon linked a pull request Oct 10, 2022 that will close this issue
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

3 participants