Module: Interaptor::ClassMethods

Defined in:
lib/interaptor/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#after(&block) ⇒ Object



32
33
34
# File 'lib/interaptor/callbacks.rb', line 32

def after(&block)
  after_callbacks << block
end

#after_callbacksObject



40
41
42
# File 'lib/interaptor/callbacks.rb', line 40

def after_callbacks
  @after_callbacks ||= []
end

#before(&block) ⇒ Object



28
29
30
# File 'lib/interaptor/callbacks.rb', line 28

def before(&block)
  before_callbacks << block
end

#before_callbacksObject



36
37
38
# File 'lib/interaptor/callbacks.rb', line 36

def before_callbacks
  @before_callbacks ||= []
end