Module: Lolita::Hooks::CommonMethods

Defined in:
lib/lolita/hooks.rb

Overview

Shared methods between class and instance.

Instance Method Summary collapse

Instance Method Details

#callbacksObject

All callbacks for class or instance.



232
233
234
235
236
237
238
239
# File 'lib/lolita/hooks.rb', line 232

def callbacks
  var=self.instance_variable_get(:@callbacks)
  unless var
    var={}
    self.instance_variable_set(:@callbacks,var)
  end
  instance_variable_get(:@callbacks)
end