Skip to content

Instantly share code, notes, and snippets.

@npj
Created May 4, 2012 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npj/2596191 to your computer and use it in GitHub Desktop.
Save npj/2596191 to your computer and use it in GitHub Desktop.
class Slug
class << self
def [](slug)
redis.hget(hash, slug)
end
private
def redis
$redis
end
def hash
"post_ids"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment