mirror of
https://github.com/samsonjs/stormy-weather.git
synced 2026-03-25 09:15:57 +00:00
13 lines
213 B
Ruby
13 lines
213 B
Ruby
# Copyright 2012 Sami Samhuri <sami@samhuri.net>
|
|
|
|
class Class
|
|
|
|
def singleton
|
|
(class <<self; self end)
|
|
end
|
|
|
|
def define_class_method(name, &body)
|
|
singleton.send(:define_method, name, &body)
|
|
end
|
|
|
|
end
|