Class: Omnizip::Parity::Par2Verifier::VerificationResult
- Inherits:
-
Struct
- Object
- Struct
- Omnizip::Parity::Par2Verifier::VerificationResult
- Defined in:
- lib/omnizip/parity/par2_verifier.rb
Overview
Verification result
Instance Attribute Summary collapse
-
#all_ok ⇒ Object
Returns the value of attribute all_ok.
-
#damaged_blocks ⇒ Object
Returns the value of attribute damaged_blocks.
-
#damaged_files ⇒ Object
Returns the value of attribute damaged_files.
-
#missing_files ⇒ Object
Returns the value of attribute missing_files.
-
#recovery_blocks ⇒ Object
Returns the value of attribute recovery_blocks.
-
#repairable ⇒ Object
Returns the value of attribute repairable.
-
#total_blocks ⇒ Object
Returns the value of attribute total_blocks.
Instance Method Summary collapse
-
#all_ok? ⇒ Boolean
Check if all files are OK.
-
#damage_count ⇒ Integer
Get total damage count.
-
#repairable? ⇒ Boolean
Check if damage can be repaired.
Instance Attribute Details
#all_ok ⇒ Object
Returns the value of attribute all_ok
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def all_ok @all_ok end |
#damaged_blocks ⇒ Object
Returns the value of attribute damaged_blocks
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def damaged_blocks @damaged_blocks end |
#damaged_files ⇒ Object
Returns the value of attribute damaged_files
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def damaged_files @damaged_files end |
#missing_files ⇒ Object
Returns the value of attribute missing_files
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def missing_files @missing_files end |
#recovery_blocks ⇒ Object
Returns the value of attribute recovery_blocks
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def recovery_blocks @recovery_blocks end |
#repairable ⇒ Object
Returns the value of attribute repairable
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def repairable @repairable end |
#total_blocks ⇒ Object
Returns the value of attribute total_blocks
23 24 25 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 23 def total_blocks @total_blocks end |
Instance Method Details
#all_ok? ⇒ Boolean
Check if all files are OK
36 37 38 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 36 def all_ok? damaged_files.empty? && missing_files.empty? end |
#damage_count ⇒ Integer
Get total damage count
50 51 52 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 50 def damage_count damaged_blocks.size + missing_files.size end |
#repairable? ⇒ Boolean
Check if damage can be repaired
43 44 45 |
# File 'lib/omnizip/parity/par2_verifier.rb', line 43 def repairable? repairable end |