Class: DependencyCheck
- Inherits:
-
Object
- Object
- DependencyCheck
- Defined in:
- lib/ubnt/usg/restore/dependency_check.rb
Instance Method Summary collapse
- #has_dependencies? ⇒ Boolean
- #has_extraction_utils? ⇒ Boolean
- #has_filesystem_utils? ⇒ Boolean
- #has_partition_utils? ⇒ Boolean
Instance Method Details
#has_dependencies? ⇒ Boolean
15 16 17 18 19 |
# File 'lib/ubnt/usg/restore/dependency_check.rb', line 15 def has_dependencies? [ :has_filesystem_utils?, :has_filesystem_utils? ].all do |check| self.public_send(check) end end |
#has_extraction_utils? ⇒ Boolean
11 12 13 |
# File 'lib/ubnt/usg/restore/dependency_check.rb', line 11 def has_extraction_utils? `which unzip` end |
#has_filesystem_utils? ⇒ Boolean
7 8 9 |
# File 'lib/ubnt/usg/restore/dependency_check.rb', line 7 def has_filesystem_utils? `which mke2fs` end |
#has_partition_utils? ⇒ Boolean
3 4 5 |
# File 'lib/ubnt/usg/restore/dependency_check.rb', line 3 def has_partition_utils? `which parted`.any? end |