module Sequel::Plugins::InstanceFilters::InstanceMethods

  1. lib/sequel/plugins/instance_filters.rb

Public Instance methods

after_destroy()

Clear the instance filters after successfully destroying the object.

[show source]
   # File lib/sequel/plugins/instance_filters.rb
55 def after_destroy
56   super
57   clear_instance_filters
58 end
after_update()

Clear the instance filters after successfully updating the object.

[show source]
   # File lib/sequel/plugins/instance_filters.rb
61 def after_update
62   super
63   clear_instance_filters
64 end
freeze()

Freeze the instance filters when freezing the object

[show source]
   # File lib/sequel/plugins/instance_filters.rb
67 def freeze
68   instance_filters.freeze
69   super
70 end
instance_filter(*args, &block)

Add an instance filter to the array of instance filters Both the arguments given and the block are passed to the dataset’s filter method.

[show source]
   # File lib/sequel/plugins/instance_filters.rb
75 def instance_filter(*args, &block)
76   instance_filters << [args, block]
77 end