You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/concept/boutique-inventory-improvements/.docs/instructions.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Instructions
2
2
3
-
You're continuing to work on the stock management system you built previously. Since discovering `OpenStruct` and block shortcuts, you've decided to refactor the code a little. Rather than storing the items as hashes, you're going to utilize your newfound skills.
3
+
You're continuing to work on the stock management system you built previously.
4
+
Since discovering `OpenStruct` and block shortcuts, you've decided to refactor the code a little.
5
+
Rather than storing the items as hashes, you're going to utilize your newfound skills.
4
6
5
7
## 1. Allow retrievable of items
6
8
@@ -24,7 +26,7 @@ inventory.items.size
24
26
# => 4
25
27
```
26
28
27
-
# 2. Refactor `item_names`
29
+
##2. Refactor `item_names`
28
30
29
31
Refactor `item_names` to use the new block shortcut you've learnt rather than hashes.
30
32
As a reminder, the method should return:
@@ -40,11 +42,10 @@ BoutiqueInventory.new([
40
42
# => ["Bamboo Socks Cats", "Black Short Skirt", "Maxi Brown Dress", "Red Short Skirt"]
41
43
```
42
44
45
+
## 3. Refactor `total_stock`
43
46
44
-
# 2. Refactor `total_stock`
45
-
46
-
Refactor `total_stock` to use the openstruct's method, rather than referencing a hash.
47
-
As a reminder, the method should return::
47
+
Refactor `total_stock` to use the OpenStruct's method, rather than referencing a hash.
0 commit comments