collinsmezie / Ruby_capstone_catalog

0 stars 0 forks source link

[1pt]Create a Label class - team member#1 #9

Open collinsmezie opened 2 years ago

collinsmezie commented 2 years ago

Create a Label class with an association to the Item class (in a separate .rb file). All Label class properties visible in the diagram should be defined and set up in the constructor method. Implement methods: add_item method in the Label class should take an instance of the Item class as an input should add the input item to the collection of items should add self as a property of the item object (by using the correct setter from the item object)

Add unit tests for all implemented methods.

The following options should be available: List all labels (e.g. 'Gift', 'New')

All data should be preserved by saving collections in .json files.