Skip to content

Instantly share code, notes, and snippets.

@anildigital
Created November 23, 2008 13:56
Show Gist options
  • Save anildigital/28116 to your computer and use it in GitHub Desktop.
Save anildigital/28116 to your computer and use it in GitHub Desktop.
class Person
class << self
class << self
def hi
puts "Hi"
end
end
end
def self.hi
self.self_obj.hi
end
def self.self_obj
class << self
return self
end
end
end
Person.hi
result:
"Hi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment