def to_tmpfiles
      scenario_file = Tempfile.new 'scenario'
      scenario_file.write @xml
      scenario_file.rewind

      if @media
        media_file = Tempfile.new 'media'
        media_file.write @media
        media_file.rewind
      else
        media_file = nil
      end

      {scenario: scenario_file, media: media_file}
    end
def to_tmpfiles
      scenario_file = Tempfile.new 'scenario'
      scenario_file.write @xml
      scenario_file.rewind

      if @media
        media_file = Tempfile.new 'media'
        media_file.write @media
        media_file.rewind
      else
        media_file = nil
      end

      {scenario: scenario_file, media: media_file}
    end
Create a scenario instance

 @param [String] name The scenario's name
 @param [String] xml The XML document representing the scenario
 @param [String] media The media to be invoked by the scenario in PCAP format
 @param [Hash] args options to customise the scenario. @see Scenario#initialize.


 Write compiled Scenario XML and PCAP media to tempfiles.

 These will automatically be closed and deleted once they have gone out of scope, and can be used to execute the scenario without leaving stuff behind.

 @return [Hash<Symbol => Tempfile>] handles to created Tempfiles at :scenario and :media

 @see http://www.ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html