Class: Spider::TransientHash

Inherits:
FlashHash show all
Defined in:
lib/spiderfw/controller/session/transient_hash.rb

Instance Attribute Summary

Attributes inherited from FlashHash

#accessed, #active, #parent_flash, #parent_flash_key

Instance Method Summary collapse

Methods inherited from FlashHash

#[], #[]=, #delete, #initialize, #reset

Constructor Details

This class inherits a constructor from Spider::FlashHash

Instance Method Details

#purgeObject



7
8
9
10
11
12
13
14
# File 'lib/spiderfw/controller/session/transient_hash.rb', line 7

def purge
    if (@parent_flash && @parent_flash_key && @parent_flash.accessed[@parent_flash_key])
        self.delete_if{ |k, v| !@accessed[k] && !@active[k] }
    end
    @sub_flashes.each{ |k, f| f.purge }
    @accessed = {}
    @active = {}
end