Class: Object

### Home Classes Methods

### In Files

- metaid.rb

### Parent

BasicObject

### Methods

- #class_def
- #meta_def
- #meta_eval
- #metaclass

### Class/Module Index

Quicksearch

- Object

No matching classes.

# Object

Metaid == a few simple metaclass helper (See whytheluckystiff.net/articles/seeingMetaclassesClearly.html.)

### Public Instance Methods

class_def(name, &blk) click to toggle source

Defines an instance method within a class

    # File metaid.rb, line 14
    def class_def name, &blk
        class_eval { define_method name, &blk }
    end

meta_def(name, &blk) click to toggle source

Adds methods to a metaclass

    # File metaid.rb, line 9
    def meta_def name, &blk
        meta_eval { define_method name, &blk }
    end

meta_eval(&blk;) click to toggle source

    # File metaid.rb, line 6
    def meta_eval &blk; metaclass.instance_eval &blk; end

metaclass() click to toggle source

The hidden singleton lurks behind everyone

    # File metaid.rb, line 5
    def metaclass; class << self; self; end; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.