Method: PreInitialize::ClassMethods#before_init_set

Defined in:
lib/shattered_support/pre_initialize.rb

#before_init_set(variable, options = {}) ⇒ Object

In the pre_initialization phase (see #before_init_call), send an object a bunch of sets.

This is used in actor, camera, mesh, and virtually everywhere to support the format of:

mesh "ruby", :position => v(1,0,0)

becomes

before_init_set( :ruby, {:position => v(1,0,0) } )

becomes

ruby.position=v(1,0,0)

when the obect is initialized.



37
38
39
# File 'lib/shattered_support/pre_initialize.rb', line 37

def before_init_set(variable, options={})
  self.write_inheritable_array(BEFORE_INIT_SET_VALUES, [[ variable, options ]] )
end