Class: Y2Network::Widgets::VlanID

Inherits:
CWM::IntField
  • Object
show all
Defined in:
src/lib/y2network/widgets/vlan_id.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ VlanID


25
26
27
28
29
# File 'src/lib/y2network/widgets/vlan_id.rb', line 25

def initialize(config)
  textdomain "network"

  @config = config
end

Instance Method Details

#helpObject


35
36
37
38
# File 'src/lib/y2network/widgets/vlan_id.rb', line 35

def help
  # TODO: previously not exist, so write it
  ""
end

#initObject


40
41
42
# File 'src/lib/y2network/widgets/vlan_id.rb', line 40

def init
  self.value = @config.vlan_id
end

#labelObject


31
32
33
# File 'src/lib/y2network/widgets/vlan_id.rb', line 31

def label
  _("VLAN ID")
end

#maximumObject


52
53
54
# File 'src/lib/y2network/widgets/vlan_id.rb', line 52

def maximum
  9999
end

#minimumObject


48
49
50
# File 'src/lib/y2network/widgets/vlan_id.rb', line 48

def minimum
  0
end

#storeObject


44
45
46
# File 'src/lib/y2network/widgets/vlan_id.rb', line 44

def store
  @config.vlan_id = value
end