Class: Convert2Ascii::CheckFFmpeg
- Inherits:
-
CheckPackage
- Object
- CheckPackage
- Convert2Ascii::CheckFFmpeg
- Defined in:
- lib/convert2ascii/check_package.rb
Instance Method Summary collapse
-
#initialize ⇒ CheckFFmpeg
constructor
A new instance of CheckFFmpeg.
- #linux_check ⇒ Object
- #macos_check ⇒ Object
Methods inherited from CheckPackage
#arch_installed?, #centos_installed?, #check, #debian_installed?, #detect_linux_distribution, #macos_installed?, #ms_check, #redhat_installed?, #unknow_check
Methods included from OS
Constructor Details
#initialize ⇒ CheckFFmpeg
Returns a new instance of CheckFFmpeg.
114 115 116 117 118 119 |
# File 'lib/convert2ascii/check_package.rb', line 114 def initialize super @name = "ffmpeg" @need_error = Rainbow("[Error] `#{@name}` is need!").red @tips = Rainbow("[Tips ] For more details and install: https://www.ffmpeg.org/").green end |
Instance Method Details
#linux_check ⇒ Object
127 128 129 130 |
# File 'lib/convert2ascii/check_package.rb', line 127 def linux_check linux_platform_name = detect_linux_distribution __send__ "#{linux_platform_name}_installed?", @name end |
#macos_check ⇒ Object
121 122 123 124 125 |
# File 'lib/convert2ascii/check_package.rb', line 121 def macos_check if !macos_installed?(@name) raise CheckPackageError, "\n#{@need_error}\n#{@tips}\n" end end |