Class: Bootloader::SystemdBootWidget::TimeoutWidget

Inherits:
CWM::IntField
  • Object
show all
Includes:
SystemdBootHelper
Defined in:
src/lib/bootloader/systemdboot_widgets.rb

Overview

Represents bootloader timeout value

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SystemdBootHelper

#systemdboot

Constructor Details

#initializeTimeoutWidget

Returns a new instance of TimeoutWidget.



23
24
25
26
27
28
29
30
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 23

def initialize
  textdomain "bootloader"

  super()

  @minimum = -1
  @maximum = 600
end

Instance Attribute Details

#maximumObject (readonly)

Returns the value of attribute maximum.



32
33
34
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 32

def maximum
  @maximum
end

#minimumObject (readonly)

Returns the value of attribute minimum.



32
33
34
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 32

def minimum
  @minimum
end

Instance Method Details

#helpObject



38
39
40
41
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 38

def help
  _("<p><b>Timeout in Seconds</b>\n" \
    "specifies the time the boot loader will wait until the default kernel is loaded.</p>\n")
end

#initObject



43
44
45
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 43

def init
  self.value = systemdboot.menue_timeout.to_i
end

#labelObject



34
35
36
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 34

def label
  _("&Timeout in Seconds")
end

#storeObject



47
48
49
# File 'src/lib/bootloader/systemdboot_widgets.rb', line 47

def store
  systemdboot.menue_timeout = value.to_s
end