Module: Redis::Actions::Destroying::ClassMethods

Defined in:
lib/redis/actions/destroying.rb

Instance Method Summary collapse

Instance Method Details

#destroy_allObject



30
31
32
# File 'lib/redis/actions/destroying.rb', line 30

def destroy_all
  all.each { |orm| orm.destroy }
end

#within_destroy_block(method_name = nil, &block) ⇒ Object



34
35
36
37
# File 'lib/redis/actions/destroying.rb', line 34

def within_destroy_block(method_name = nil, &block)
  within_destroy_blocks << method_name if method_name
  within_destroy_blocks << block       if block_given?
end