lib/demiurge.rb
# This method dumps the Engine's state in {Demiurge::StateItem}
# structured array format.  This method is how one would normally
# collect a full state dump of the engine suitable for later
# restoration.
#
# @param [Hash] options Options for dumping state
# @option options [Boolean] copy If true, copy the serialized state rather than allowing any links into StateItem objects. This reduces performance but increases security.
# @return [Array] The engine's state in {Demiurge::StateItem} structured array format
# @since 0.0.1
# @see #load_state_from_dump
This method dumps the Engine's state in {Demiurge::StateItem}
structured array format.  This method is how one would normally
collect a full state dump of the engine suitable for later
restoration.
This method dumps the Engine ' s state in { Demiurge :: StateItem } structured array format . This method is how one would normally collect a full state dump of the engine suitable for later restoration .
def structured_state(options = { "copy" => false })
      dump = @state_items.values.map { |item| item.get_structure }
      if options["copy"]
        dump = deepcopy(dump)  
      end
      dump
    end
def structured_state ( options = { "copy" => false } ) dump = @state_items . values . map { | item | item . get_structure } if options [ "copy" ] dump = deepcopy ( dump ) end dump end
This method dumps the Engine's state in {Demiurge::StateItem}
structured array format.
This method dumps the Engine ' s state in { Demiurge :: StateItem } structured array format .
# Make sure it doesn't share state...
The engine's state in {Demiurge::StateItem} structured array format
The engine ' s state in { Demiurge :: StateItem } structured array format
Array
options
copy If true, copy the serialized state rather than allowing any links into StateItem objects. This reduces performance but increases security.
copy If true copy the serialized state rather than allowing any links into StateItem objects . This reduces performance but increases security .
options Options for dumping state
options Options for dumping state
since
None
see
None