Method: Prototype.prototyping

Defined in:
lib/alib-0.5.1/prototype.rb,
lib/alib-0.5.1/prototype-0.3.0.rb

.prototyping(obj, *a, &b) ⇒ Object



179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/alib-0.5.1/prototype.rb', line 179

def prototyping obj, *a, &b
  c =
    class << obj 
      self
    end
  parent = c.class
  c.extend Prototypical unless Prototypical === c
  c.__prototype_table__.update parent.__prototype_table__ if
    parent.respond_to? '__prototype_table__'
  c.__prototype_prototype__ &b
  obj.__prototype_init__ c
  obj
end