Skip to content

Instantly share code, notes, and snippets.

@sdevani
Created May 9, 2014 19:46
Show Gist options
  • Save sdevani/9977ed885b26a5e61fc0 to your computer and use it in GitHub Desktop.
Save sdevani/9977ed885b26a5e61fc0 to your computer and use it in GitHub Desktop.
db.rb
module TM
class DB
attr_reader :tasks, :projects
def initialize
@projects = {}
@project_count = 0
end
def create_project(data)
end
def get_project(id)
end
def destroy_project(id)
end
def build_project(data)
Project.new(data[:name], data[:id])
end
end
def self.db
@__db_instance ||= DB.new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment