Class: EhbrsRubyUtils::Videos2::Unsupported::Checks::InvalidExtension

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/videos2/unsupported/checks/invalid_extension.rb

Constant Summary collapse

TYPE =
:container

Instance Method Summary collapse

Instance Method Details

#check(video) ⇒ Object



14
15
16
17
18
# File 'lib/ehbrs_ruby_utils/videos2/unsupported/checks/invalid_extension.rb', line 14

def check(video)
  return nil unless ::File.extname(video.path) == extension

  "File has invalid extension: #{extension}"
end

#fixObject



20
21
22
# File 'lib/ehbrs_ruby_utils/videos2/unsupported/checks/invalid_extension.rb', line 20

def fix
  ::EhbrsRubyUtils::Videos2::Unsupported::Fixes::SupportedContainer.new
end