lib/getch/filesystem/ext4/partition.rb in getch-0.1.6 vs lib/getch/filesystem/ext4/partition.rb in getch-0.1.9
- old
+ new
@@ -1,22 +1,25 @@
+# frozen_string_literal: true
+
module Getch
module FileSystem
module Ext4
class Partition < Getch::FileSystem::Ext4::Device
def initialize
super
- @state = Getch::States.new()
+ @state = Getch::States.new
@clean = Getch::FileSystem::Clean
@partition = Getch::FileSystem::Partition.new
run_partition
end
def run_partition
return if STATES[:partition ]
+
@clean.hdd(@disk)
@clean.external_disk(@disk, @boot_disk, @cache_disk, @home_disk)
- if Helpers::efi?
+ if Helpers.efi?
partition_efi
else
partition_bios
end
@state.partition
@@ -30,22 +33,22 @@
# swap - Linux Swap - size of the ram
# / - Root
# /home - Home
@partition.efi(@dev_esp)
@partition.swap(@dev_swap)
- @partition.root(@dev_root, "8304")
- @partition.home(@dev_home, "8302") if @dev_home
+ @partition.root(@dev_root, '8304')
+ @partition.home(@dev_home, '8302') if @dev_home
end
def partition_bios
# None - Bios Boot Partition - 1MiB
# / - Root
# swap - Linux Swap - size of the ram
# /home - Home
@partition.gpt(@dev_gpt)
@partition.swap(@dev_swap)
- @partition.root(@dev_root, "8304")
- @partition.home(@dev_home, "8302") if @dev_home
+ @partition.root(@dev_root, '8304')
+ @partition.home(@dev_home, '8302') if @dev_home
end
end
end
end
end