Skip to content

Instantly share code, notes, and snippets.

@mikeebert
Last active December 11, 2015 22:29
Show Gist options
  • Save mikeebert/4670203 to your computer and use it in GitHub Desktop.
Save mikeebert/4670203 to your computer and use it in GitHub Desktop.
Repository Class
class Repository
def self.register(type, repo)
repositories[type] = repo
end
def self.repositories
@repositories ||= {}
end
def self.for(type)
repositories[type]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment