Class: Ffprober::Ffmpeg::Version
- Inherits:
-
Object
- Object
- Ffprober::Ffmpeg::Version
- Defined in:
- lib/ffprober/ffmpeg/version.rb
Constant Summary collapse
- VERSION_REGEX =
/^(ffprobe|avprobe|ffmpeg) version (\d+)\.?(\d+)\.?(\d+)*/- NIGHTLY_REGEX =
/^(ffprobe|avprobe|ffmpeg) version (N|git)-/- VERSION_FALLBACK =
[0, 0, 0].freeze
Instance Method Summary collapse
-
#initialize(ffprobe_exec = Ffprober::Ffmpeg::Exec.new) ⇒ Version
constructor
A new instance of Version.
- #nightly? ⇒ Boolean
- #version ⇒ Object
Constructor Details
#initialize(ffprobe_exec = Ffprober::Ffmpeg::Exec.new) ⇒ Version
6 7 8 |
# File 'lib/ffprober/ffmpeg/version.rb', line 6 def initialize(ffprobe_exec = Ffprober::Ffmpeg::Exec.new) @ffprobe_exec = ffprobe_exec end |
Instance Method Details
#nightly? ⇒ Boolean
18 19 20 |
# File 'lib/ffprober/ffmpeg/version.rb', line 18 def nightly? !(ffprobe_version_output =~ NIGHTLY_REGEX).nil? end |
#version ⇒ Object
14 15 16 |
# File 'lib/ffprober/ffmpeg/version.rb', line 14 def version @version ||= Gem::Version.new(parse_version.join('.')) end |