Module: Hanami::Action::Callbacks

Defined in:
lib/hanami/action/callbacks.rb

Overview

Before and after callbacks

See Also:

  • Hanami::Action::ClassMethods#before
  • Hanami::Action::ClassMethods#after

Since:

  • 0.1.0

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Override Ruby's hook for modules. It includes callbacks logic

Parameters:

  • base (Class)

    the target action

See Also:

Since:

  • 0.1.0


21
22
23
24
25
26
# File 'lib/hanami/action/callbacks.rb', line 21

def self.included(base)
  base.class_eval do
    extend  ClassMethods
    prepend InstanceMethods
  end
end