lib/atome/helpers/utilities.rb in atome-0.5.1.1 vs lib/atome/helpers/utilities.rb in atome-0.5.1.4

- old
+ new

@@ -2,33 +2,26 @@ # toolbox method here class Atome private - def a_render + def collapse @atome.each do |element, value| send(element, value) unless element == :type end end def security_pass(_element, _value) true end - def particle_sanitizer(_element, params) + def sanitize(element, params) + bloc_found = Universe.get_sanitizer_method(element) + params = instance_exec(params, &bloc_found) if bloc_found.is_a?(Proc) params end - def atome_sanitizer(element, params) - send("sanitize_#{element}", params) - end - - def sanitize_particle(element, value, &user_proc) - value = particle_sanitizer(element, value) - create_particle(element, value, &user_proc) - end - def identity_generator { date: Time.now, location: geolocation } end def broadcasting(element, value) @@ -51,7 +44,11 @@ end def <<(particle) value = particle.value real_atome[property] << value + end + + def refresh + collapse end end