Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/platform_helpers/simple_def.rb
Instance Method Summary collapse
Instance Method Details
#define_me(name, *args, &blk) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/platform_helpers/simple_def.rb', line 5 def define_me(name, *args, &blk) .module_eval { define_method(name) { |*args| self.instance_exec(*args, &blk) } } end |
#metaclass ⇒ Object
2 3 4 |
# File 'lib/platform_helpers/simple_def.rb', line 2 def class << self;self;end end |