module Sass::Callbacks
def define_callback(name)
-
(void)
-
Parameters:
-
name
(Symbol
) -- The name of the callback
def define_callback(name) class_eval <<RUBY on_#{name}(&block) sass_callbacks ||= {} _sass_callbacks[#{name.inspect}] ||= []) << block run_#{name}(*args) turn unless @_sass_callbacks turn unless @_sass_callbacks[#{name.inspect}] sass_callbacks[#{name.inspect}].each {|c| c[*args]} ate :run_#{name} end