Sha256: dee6753d79b7d6104b859b118f8d57066c94192dca21996b0b63d73ff0e7ed84
Contents?: true
Size: 454 Bytes
Versions: 10
Compression:
Stored size: 454 Bytes
Contents
class Object ## # Return the metaclass of this object. def metaclass class << self; self end end ## # Evaluate a +string+ or +block+ in context to this # object metaclass. def meta_eval string = nil, &block return metaclass.class_eval(string) if string metaclass.class_eval &block end ## # Define a singleton method. def meta_def name, &block meta_eval { define_method name, &block } end end
Version data entries
10 entries across 10 versions & 1 rubygems