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
| 14 15 16 | # File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 14 def copy_to_selected_dir ::FileUtils.cp(path.to_path, selected_dir.to_path) end | 
#match_quality?(quality) ⇒ Boolean
| 18 19 20 21 | # File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 18 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
| 23 24 25 | # File 'lib/ehbrs_ruby_utils/videos2/extract/package_file.rb', line 23 def move_to_quality_dir ::FileUtils.mv(path.to_path, quality_dir.to_path) end |