Method: Atome#atome_processor

Defined in:
lib/atome/utilities/utilities.rb

#atome_processor(element, params, &user_proc) ⇒ Object



368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/atome/utilities/utilities.rb', line 368

def atome_processor(element, params, &user_proc)
  # TODO: replace with the line below but need extensive testing as it crash some demos ex: animation
  params = atome_common(element, params)

  atome_pre_process(element, params, &user_proc)

  new_atome = send("set_#{element}", params, &user_proc) # it call  Atome.define_method "set_#{element}" in  new_atome method
  # TODO : check if we don't have a security issue allowing atome modification after creation
  # if we have one find another solution the keep this facility
  atome_post_process(element, params, new_atome, &user_proc)

  new_atome
end