Class: Video
- Inherits:
-
CommitPhoto
- Object
- CommitPhoto
- Video
- Defined in:
- lib/commitphotos/video.rb
Constant Summary
Constants inherited from CommitPhoto
Instance Method Summary collapse
-
#initialize ⇒ Video
constructor
A new instance of Video.
Methods inherited from CommitPhoto
Constructor Details
#initialize ⇒ Video
Returns a new instance of Video.
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/commitphotos/video.rb', line 2 def initialize path = "/tmp/#{Time.now.to_i.to_s}.mov" `#{dir}/videosnap -t 2 --no-audio #{path}` begin post(File.open path) rescue => e abort "Unable to capture video: #{e.}" ensure FileUtils.rm(path) end end |