module Sequel::Plugins::InstanceFilters::InstanceMethods

Public Instance Methods

after_destroy() click to toggle source

Clear the instance filters after successfully destroying the object.

Calls superclass method
   # File lib/sequel/plugins/instance_filters.rb
55 def after_destroy
56   super
57   clear_instance_filters
58 end
after_update() click to toggle source

Clear the instance filters after successfully updating the object.

Calls superclass method
   # File lib/sequel/plugins/instance_filters.rb
61 def after_update
62   super
63   clear_instance_filters
64 end
freeze() click to toggle source

Freeze the instance filters when freezing the object

Calls superclass method
   # File lib/sequel/plugins/instance_filters.rb
67 def freeze
68   instance_filters.freeze
69   super
70 end
instance_filter(*args, &block) click to toggle source

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.

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