Class/Module Index [+]

Quicksearch

Sequel::Plugins::InstanceFilters::InstanceMethods

Public Instance Methods

after_destroy() click to toggle source

Clear the instance filters after successfully destroying the object.

# File lib/sequel/plugins/instance_filters.rb, line 51
def after_destroy
  super
  clear_instance_filters
end
after_update() click to toggle source

Clear the instance filters after successfully updating the object.

# File lib/sequel/plugins/instance_filters.rb, line 57
def after_update
  super
  clear_instance_filters
end
dup() click to toggle source

Duplicate internal structures when duplicating model instance.

# File lib/sequel/plugins/instance_filters.rb, line 63
def dup
  ifs = instance_filters.dup
  super.instance_eval do
    @instance_filters = ifs
    self
  end
end
freeze() click to toggle source

Freeze the instance filters when freezing the object

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.