Created
May 23, 2019 04:11
-
-
Save chelseatroy/f22966e8622cd1d6b5787efddcc08230 to your computer and use it in GitHub Desktop.
Initial Database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Database | |
def initialize | |
@db = Hash.new() | |
end | |
# CRUD COMMANDS | |
def set(key, value) | |
@db[key] = value | |
return nil | |
end | |
def get(key) | |
@db.fetch(key, "NULL") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment