collinsmezie / Ruby_capstone_catalog

0 stars 0 forks source link

[0.5pt]Create Item class - group task #5

Open collinsmezie opened 2 years ago

collinsmezie commented 2 years ago

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. Implement methods visible in the diagram:

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 o