Module: CWM::ValueBasedWidget

Included in:
CheckBox, ComboBox, InputField, IntField, MultiLineEdit, Password, RichText
Defined in:
library/cwm/src/lib/cwm/common_widgets.rb

Overview

A mix-in for widgets using the :Value property

Instance Method Summary collapse

Instance Method Details

#valueObject

Get widget value

Returns:

  • (Object)

    a value according to specific widget type



29
30
31
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 29

def value
  Yast::UI.QueryWidget(Id(widget_id), :Value)
end

#value=(val) ⇒ void

This method returns an undefined value.

Set widget value

Parameters:

  • val (Object)

    a value according to specific widget type



36
37
38
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 36

def value=(val)
  Yast::UI.ChangeWidget(Id(widget_id), :Value, val)
end