Module: Hanami::Action::Callbacks::ClassMethods Private
- Defined in:
- lib/idempotency/hanami/action/callbacks.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Callbacks API class methods
Class Method Summary collapse
-
.extended(base) ⇒ Object
private
Override Ruby’s hook for modules.
Instance Method Summary collapse
- #append_after(*callbacks) ⇒ Object (also: #after) private
- #append_around ⇒ Object (also: #around) private
- #append_before(*callbacks) ⇒ Object (also: #before) private
- #prepend_after(*callbacks) ⇒ Object private
- #prepend_before(*callbacks) ⇒ Object private
Class Method Details
.extended(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
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 48 def self.extended(base) base.class_eval do include Utils::ClassAttribute class_attribute :before_callbacks self.before_callbacks = Utils::Callbacks::Chain.new class_attribute :after_callbacks self.after_callbacks = Utils::Callbacks::Chain.new class_attribute :around_callbacks self.around_callbacks = Utils::Callbacks::Chain.new end end |
Instance Method Details
#append_after(*callbacks) ⇒ Object Also known as: after
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.
75 76 77 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 75 def append_after(*callbacks, &) after_callbacks.append(*callbacks, &) end |
#append_around ⇒ Object Also known as: around
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.
63 64 65 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 63 def append_around(&) around_callbacks.append_around(&) end |
#append_before(*callbacks) ⇒ Object Also known as: before
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.
69 70 71 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 69 def append_before(*callbacks, &) before_callbacks.append(*callbacks, &) end |
#prepend_after(*callbacks) ⇒ 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.
85 86 87 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 85 def prepend_after(*callbacks, &) after_callbacks.prepend(*callbacks, &) end |
#prepend_before(*callbacks) ⇒ 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.
81 82 83 |
# File 'lib/idempotency/hanami/action/callbacks.rb', line 81 def prepend_before(*callbacks, &) before_callbacks.prepend(*callbacks, &) end |