Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/ambition/core_ext.rb
Overview
Object extensions to make metaprogramming a little easier.
Instance Method Summary collapse
- #class_def(name, &blk) ⇒ Object
- #meta_def(name, &blk) ⇒ Object
- #meta_eval(&blk) ⇒ Object
- #metaclass ⇒ Object
- #recursive_const_get(name) ⇒ Object
Instance Method Details
#class_def(name, &blk) ⇒ Object
6 |
# File 'lib/ambition/core_ext.rb', line 6 def class_def(name, &blk) class_eval { define_method name, &blk } end |
#meta_def(name, &blk) ⇒ Object
5 |
# File 'lib/ambition/core_ext.rb', line 5 def (name, &blk) { define_method name, &blk } end |
#meta_eval(&blk) ⇒ Object
4 |
# File 'lib/ambition/core_ext.rb', line 4 def (&blk) .instance_eval(&blk) end |
#metaclass ⇒ Object
3 |
# File 'lib/ambition/core_ext.rb', line 3 def ; (class << self; self end) end |