Skip to content

Commit

Permalink
add all documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GideonBature committed Oct 15, 2023
1 parent 05d38f5 commit 22ad2b4
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions console.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,25 @@ def do_update(self, line):
storage.save()

def default(self, line):
"""Retrieves all instances of a class
Usage: <class name>.all()
""" Retrieves all instances of a class
Retrieves the number of instances of a class
Retrieves an instance based on its ID
Destroys an instance based on its ID
Updates an instance based on its ID
Updates an instance based on it's ID with a dict
Usage:
<class name>.all()
<class name>.count()
<class name>.show(<id>)
<class name>.destroy(<id>)
<class name>.update(<id>, <attribute name>, <attribute value>)
<class name>.update(<id>, <dictionary representation>)
Args:
<class name>: The class name
all(): the method
<class name>: The class name
all(): count command
count(): count command
Returns:
None
"""
Expand Down

0 comments on commit 22ad2b4

Please sign in to comment.