Sha256: 6510fe1dba8897d956b76aa2ba314ef7b7f0d2eb488c8a2ccbeaea2d98364817
Contents?: true
Size: 850 Bytes
Versions: 35
Compression:
Stored size: 850 Bytes
Contents
module Scorpion # A scorpion factory class Nest # ============================================================================ # @!group Associations # # @!attribute # @return [Scorpion] the mother scorpion that that will {#conceive} new # scorpions for each request. attr_reader :mother # # @!endgroup Associations def initialize( mother = nil ) @mother = mother || Scorpion::Hunter.new end def prepare( &block ) mother.prepare &block end # @return [Scorpion] a new scorpion used to hunt for dependencies. def conceive mother.replicate end # Free up any persistent resources def destroy mother.destroy @mother = nil end # Reset the hunting map and clear all dependencies. def reset mother.reset end end end
Version data entries
35 entries across 35 versions & 1 rubygems