Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/trinidad_scheduler_extension/extensions/object.rb
Overview
Metaid == a few simple metaclass helper (See whytheluckystiff.net/articles/seeingMetaclassesClearly.html.)
Instance Method Summary collapse
-
#meta_def(name, &blk) ⇒ Object
Adds methods to a metaclass.
- #meta_eval(&blk) ⇒ Object
-
#metaclass ⇒ Object
The hidden singleton lurks behind everyone.
Instance Method Details
#meta_def(name, &blk) ⇒ Object
Adds methods to a metaclass
9 10 11 |
# File 'lib/trinidad_scheduler_extension/extensions/object.rb', line 9 def name, &blk { define_method name, &blk } end |
#meta_eval(&blk) ⇒ Object
6 |
# File 'lib/trinidad_scheduler_extension/extensions/object.rb', line 6 def &blk; .instance_eval &blk; end |
#metaclass ⇒ Object
The hidden singleton lurks behind everyone
5 |
# File 'lib/trinidad_scheduler_extension/extensions/object.rb', line 5 def ; class << self; self; end; end |