Class: Getch::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/getch/device.rb

Instance Method Summary collapse

Constructor Details

#initializeDevice

Returns a new instance of Device.



7
8
9
10
# File 'lib/getch/device.rb', line 7

def initialize
  @file = File.join('/tmp/getch_devs.yaml')
  load_devs
end

Instance Method Details

#boot(dev) ⇒ Object



22
23
24
25
# File 'lib/getch/device.rb', line 22

def boot(dev)
  DEVS[:boot] = dev
  save
end

#efi(dev) ⇒ Object



17
18
19
20
# File 'lib/getch/device.rb', line 17

def efi(dev)
  DEVS[:efi] = dev
  save
end

#gpt(dev) ⇒ Object



12
13
14
15
# File 'lib/getch/device.rb', line 12

def gpt(dev)
  DEVS[:gpt] = dev
  save
end

#home(dev) ⇒ Object



37
38
39
40
# File 'lib/getch/device.rb', line 37

def home(dev)
  DEVS[:home] = dev
  save
end

#root(dev) ⇒ Object



32
33
34
35
# File 'lib/getch/device.rb', line 32

def root(dev)
  DEVS[:root] = dev
  save
end

#swap(dev) ⇒ Object



27
28
29
30
# File 'lib/getch/device.rb', line 27

def swap(dev)
  DEVS[:swap] = dev
  save
end

#zcache(dev) ⇒ Object



47
48
49
50
# File 'lib/getch/device.rb', line 47

def zcache(dev)
  DEVS[:zcache] = dev
  save
end

#zlog(dev) ⇒ Object



42
43
44
45
# File 'lib/getch/device.rb', line 42

def zlog(dev)
  DEVS[:zlog] = dev
  save
end