module Sequel::Plugins::InstanceFilters::InstanceMethods

  1. lib/sequel/plugins/instance_filters.rb
Parent: InstanceFilters

Public Instance methods

after_destroy ()

Clear the instance filters after successfully destroying the object.

[show source]
# File lib/sequel/plugins/instance_filters.rb, line 51
def after_destroy
  super
  clear_instance_filters
end
after_update ()

Clear the instance filters after successfully updating the object.

[show source]
# File lib/sequel/plugins/instance_filters.rb, line 57
def after_update
  super
  clear_instance_filters
end
freeze ()

Freeze the instance filters when freezing the object

[show source]
# File lib/sequel/plugins/instance_filters.rb, line 63
def freeze
  instance_filters.freeze
  super
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, line 71
def instance_filter(*args, &block)
  instance_filters << [args, block]
end