Class Object
In: lib/sinatra/core_ext/metaid.rb
Parent: Object

Methods

Public Instance methods

Defines an instance method within a class

[Source]

    # File lib/sinatra/core_ext/metaid.rb, line 15
15:    def class_def name, &blk
16:      class_eval { define_method name, &blk }
17:    end

Adds methods to a metaclass

[Source]

    # File lib/sinatra/core_ext/metaid.rb, line 10
10:    def meta_def name, &blk
11:      meta_eval { define_method name, &blk }
12:    end

[Source]

   # File lib/sinatra/core_ext/metaid.rb, line 7
7:    def meta_eval &blk; metaclass.instance_eval &blk; end

The hidden singleton lurks behind everyone

[Source]

   # File lib/sinatra/core_ext/metaid.rb, line 6
6:    def metaclass; class << self; self; end; end

[Validate]