Class: Bagel::Video::FFMPEG::ConcatFile
- Inherits:
-
Object
- Object
- Bagel::Video::FFMPEG::ConcatFile
- Defined in:
- lib/bagel/video/ffmpeg/concat_file.rb
Constant Summary collapse
- MP4_PATTERN =
'*.mp4'
- FFMPEG_FILE_DIRECTIVE_PREFIX =
'file' + ' '
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(source) ⇒ ConcatFile
constructor
A new instance of ConcatFile.
Constructor Details
#initialize(source) ⇒ ConcatFile
Returns a new instance of ConcatFile.
12 13 14 |
# File 'lib/bagel/video/ffmpeg/concat_file.rb', line 12 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/bagel/video/ffmpeg/concat_file.rb', line 6 def source @source end |
Class Method Details
.create(source, &block) ⇒ Object
8 9 10 |
# File 'lib/bagel/video/ffmpeg/concat_file.rb', line 8 def self.create(source, &block) new(source).create(&block) end |
Instance Method Details
#create ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/bagel/video/ffmpeg/concat_file.rb', line 16 def create Tempfile.create do |file| file.write(contents) file.flush yield(file.path) end end |