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 55
55:         def after_destroy
56:           super
57:           clear_instance_filters
58:         end

Clear the instance filters after successfully updating the object.

[Source]

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

Freeze the instance filters when freezing the object

[Source]

    # File lib/sequel/plugins/instance_filters.rb, line 67
67:         def freeze
68:           instance_filters.freeze
69:           super
70:         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 75
75:         def instance_filter(*args, &block)
76:           instance_filters << [args, block]
77:         end

[Validate]