Created
March 15, 2012 15:35
-
-
Save lunks/2044825 to your computer and use it in GitHub Desktop.
This file contains 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
module NewSession | |
class User | |
@users = Hash.new {|hash, key| hash[key] = User.new} | |
class << self | |
def find_or_create_user name | |
name = name.to_sym | |
@users[name] | |
end | |
end | |
def initialize | |
@sites = {} | |
end | |
def register_site site | |
site = site.to_sym | |
class << self | |
define_method site do | |
puts site | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment