Module: Sequel::Metaprogramming

Included in:
Database, Database, Dataset, Dataset, Model, Model
Defined in:
lib/sequel/lib/sequel/metaprogramming.rb

Overview

Contains methods that ease metaprogramming, used by some of Sequel's classes.

Instance Method Summary collapse

Instance Method Details

#meta_def(name, &block) ⇒ Object

Add methods to the object's metaclass



5
6
7
# File 'lib/sequel/lib/sequel/metaprogramming.rb', line 5

def meta_def(name, &block)
  meta_eval{define_method(name, &block)}
end