module Sequel::Plugins::InstanceHooks::InstanceMethods

  1. lib/sequel/plugins/instance_hooks.rb

Public Instance methods

after_destroy()

Run after destroy instance hooks.

[show source]
   # File lib/sequel/plugins/instance_hooks.rb
52 def after_destroy
53   super
54   return unless @instance_hooks
55   run_after_instance_hooks(:after_destroy)
56   @instance_hooks.delete(:after_destroy)
57   @instance_hooks.delete(:before_destroy)
58 end
after_save()

Run after save instance hooks.

[show source]
   # File lib/sequel/plugins/instance_hooks.rb
68 def after_save
69   super
70   return unless @instance_hooks
71   run_after_instance_hooks(:after_save)
72   @instance_hooks.delete(:after_save)
73   @instance_hooks.delete(:before_save)
74   @instance_hooks.delete(:after_validation)
75   @instance_hooks.delete(:before_validation)
76 end
after_validation()

Run after validation instance hooks.

[show source]
   # File lib/sequel/plugins/instance_hooks.rb
61 def after_validation
62   super
63   return unless @instance_hooks
64   run_after_instance_hooks(:after_validation)
65 end
before_destroy()

Run before_destroy instance hooks.

[show source]
   # File lib/sequel/plugins/instance_hooks.rb
79 def before_destroy
80   return super unless @instance_hooks
81   run_before_instance_hooks(:before_destroy)
82   super
83 end
before_save()

Run before_save instance hooks.

[show source]
   # File lib/sequel/plugins/instance_hooks.rb
86 def before_save
87   return super unless @instance_hooks
88   run_before_instance_hooks(:before_save)
89   super
90 end