Method: Timelog::Configuration#before

Defined in:
lib/timelog/configuration.rb

#before(event, &block) ⇒ Object



15
16
17
18
19
# File 'lib/timelog/configuration.rb', line 15

def before(event, &block)
  @callbacks[:before][event.to_sym] ||= []
  @callbacks[:before][event.to_sym] << block if block_given?
  @callbacks[:before][event.to_sym]
end