Module Sequel::Plugins::InstanceFilters::InstanceMethods
In: lib/sequel/plugins/instance_filters.rb

Methods

Public Instance methods

Clear the instance filters after successfully destroying the object.

[Source]

    # File lib/sequel/plugins/instance_filters.rb, line 53
53:         def after_destroy
54:           super
55:           clear_instance_filters
56:         end

Clear the instance filters after successfully updating the object.

[Source]

    # File lib/sequel/plugins/instance_filters.rb, line 59
59:         def after_update
60:           super
61:           clear_instance_filters
62:         end

Freeze the instance filters when freezing the object

[Source]

    # File lib/sequel/plugins/instance_filters.rb, line 65
65:         def freeze
66:           instance_filters.freeze
67:           super
68:         end

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.

[Source]

    # File lib/sequel/plugins/instance_filters.rb, line 73
73:         def instance_filter(*args, &block)
74:           instance_filters << [args, block]
75:         end

[Validate]