Sha256: 42b80c54c98eac4a1e28160112fe292d620b932b6b962605a9d7e90b0e2f765e

Contents?: true

Size: 703 Bytes

Versions: 13

Compression:

Stored size: 703 Bytes

Contents

module Spider
    
    # TODO: remove?
    class SetupTask #:nodoc:
        
        # FIXME: concurrency?
        def self.current_task=(task)
            @current_task = task
        end
        
        def self.current_task
            @current_task
        end
        
        def self.inherited(subclass)
            Spider::SetupTask.current_task = subclass
        end
        
        def run
        end
        
        def rollback
            raise SetupError, "Rollback not implemented for SetupTask #{self.class}"
        end
        
        def done
            Spider::SetupTask.current_task = nil
        end
        
    end
    
    class SetupError < RuntimeError
    end
    
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spiderfw-0.5.13 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.12 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.11 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.10 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.9 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.7 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.6 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.5 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.4 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.3 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.2 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5.1 lib/spiderfw/utils/setup_task.rb
spiderfw-0.5 lib/spiderfw/utils/setup_task.rb