Class: Scissor::VideoFile
- Inherits:
-
Object
- Object
- Scissor::VideoFile
- Defined in:
- lib/scissor-video/video_file.rb
Defined Under Namespace
Classes: Error, UnknownFormat
Constant Summary collapse
- SUPPORTED_FORMATS =
%w/avi flv/
Instance Method Summary collapse
-
#initialize(filename) ⇒ VideoFile
constructor
A new instance of VideoFile.
- #length ⇒ Object
Constructor Details
#initialize(filename) ⇒ VideoFile
Returns a new instance of VideoFile.
9 10 11 12 13 14 15 16 |
# File 'lib/scissor-video/video_file.rb', line 9 def initialize(filename) @filename = Pathname.new(filename) @ext = @filename.extname.sub(/^\./, '').downcase unless SUPPORTED_FORMATS.include?(@ext) raise UnknownFormat end end |