app/models/passage.rb
def save_video_audio_passage(artifact, start, duration)
      Tempfile.open("video_audio_artifact") do |f|
        f.binmode
        f.write(artifact.file.download)
        f.rewind
        create_video_audio_passage(f.path,
                                   artifact.file.filename,
                                   start, duration)
      end
    end
##
# creates a tempfile and loads the artifact file into it, then calls
# {create_video_audio_passage} to cut and attach the passage
# @param artifact [Artifact] the artifact with the original file
# @param start [String] start value for the cut
# @param duration [String] duration value for the cut
creates a tempfile and loads the artifact file into it, then calls
{create_video_audio_passage} to cut and attach the passage
creates a tempfile and loads the artifact file into it then calls { create_video_audio_passage } to cut and attach the passage
def save_video_audio_passage(artifact, start, duration)
      Tempfile.open("video_audio_artifact") do |f|
        f.binmode
        f.write(artifact.file.download)
        f.rewind
        create_video_audio_passage(f.path,
                                   artifact.file.filename,
                                   start, duration)
      end
    end
def save_video_audio_passage ( artifact , start , duration ) Tempfile . open ( "video_audio_artifact" ) do | f | f . binmode f . write ( artifact . file . download ) f . rewind create_video_audio_passage ( f . path , artifact . file . filename , start , duration ) end end
creates a tempfile and loads the artifact file into it, then calls
{create_video_audio_passage} to cut and attach the passage
creates a tempfile and loads the artifact file into it then calls { create_video_audio_passage } to cut and attach the passage
artifact
the artifact with the original file
the artifact with the original file
start
start value for the cut
start value for the cut
duration
duration value for the cut
duration value for the cut