Class: CryptReboot::Luks::VersionDetector
- Inherits:
-
Object
- Object
- CryptReboot::Luks::VersionDetector
- Defined in:
- lib/crypt_reboot/luks/version_detector.rb
Overview
Return LUKS version or raise the exception if given file doesn’t represent a valid LUKS device
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#call(headevice) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/crypt_reboot/luks/version_detector.rb', line 11 def call(headevice) version = supported_versions.find do |tested_version| checker.call(headevice, tested_version) end return version if version raise UnsupportedVersion if checker.call(headevice) raise NotLuks end |