Module | Sequel::Metaprogramming
In: | lib/sequel/metaprogramming.rb

Contains meta_def method for adding methods to objects via blocks, used by some of Sequel‘s classes and objects.

### Methods

meta_def

### Public Instance methods

meta_def(name, &block)

Define a method with the given name and block body on the receiver.

      ds = DB[:items]
      ds.meta_def(:x){42}
      ds.x # => 42

[Source]

        # File lib/sequel/metaprogramming.rb, line 9
     9:     def meta_def(name, &block)
    10:       (class << self; self end).send(:define_method, name, &block)
    11:     end

[Validate]