Class: Object

Inherits:
BasicObject
Defined in:
opal/fron/core_ext/object.rb

Overview

Instance Method Summary collapse

Instance Method Details

#metaDef(name, &blk) ⇒ Object

Defines a class method

Parameters:

  • name (String)

    The name of the method

  • blk (Block)

    The body of the method


8
9
10
# File 'opal/fron/core_ext/object.rb', line 8

def metaDef(name, &blk)
  (class << self; self; end).instance_eval { define_method name, &blk }
end