Class: EhbrsRubyUtils::Videos2::Extract::PackageFile
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::Videos2::Extract::PackageFile
- Defined in:
- lib/ehbrs_ruby_utils/videos2/extract/package_file.rb
Constant Summary collapse
- DEFAULT_QUALITY =
'__default__'
Instance Method Summary collapse
Instance Method Details
#copy_to_selected_dir ⇒ Object
16 17 18 |
# File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 16 def copy_to_selected_dir ::FileUtils.cp(path.to_path, selected_dir.to_path) end |
#match_quality?(quality) ⇒ Boolean
20 21 22 23 |
# File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 20 def match_quality?(quality) path.basename_sub { |b| b.to_s.downcase }.basename .fnmatch?("*#{quality.downcase}*".gsub(/\A\*+/, '*').gsub(/\*+\z/, '*')) end |
#move_to_quality_dir ⇒ Object
25 26 27 |
# File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 25 def move_to_quality_dir ::FileUtils.mv(path.to_path, quality_dir.to_path) end |