e1a07fadd9
since I'd like to make the JRuby rabbitmq stuff a bit less boilerplate.
20 lines
309 B
Ruby
20 lines
309 B
Ruby
class Object
|
|
def metaclass
|
|
class << self
|
|
self
|
|
end
|
|
end
|
|
|
|
def meta_eval(&block)
|
|
metaclass.instance_eval(&block)
|
|
end
|
|
|
|
def meta_def(name, &block)
|
|
meta_eval { define_method(name, &block) }
|
|
end
|
|
|
|
def class_def(name, &block)
|
|
class_eval { define_method(name, &block) }
|
|
end
|
|
end
|