Class: LibyuiClient::Widgets::Menubutton
- Defined in:
- lib/libyui_client/widgets/menubutton.rb
Overview
Class representing a menubutton in UI. It can be YMenuButton.
Instance Method Summary collapse
-
#click(item) ⇒ Object
Sends action to click on one of the items of the menubutton in UI.
-
#items ⇒ Array<String>
Returns the list of items available to select from widget.
Methods inherited from Base
#action, #collect_all, #debug_label, #enabled?, #exists?, #initialize, #property
Methods included from LibyuiClient::Waitable
Constructor Details
This class inherits a constructor from LibyuiClient::Widgets::Base
Instance Method Details
#click(item) ⇒ Object
Sends action to click on one of the items of the menubutton in UI.
12 13 14 |
# File 'lib/libyui_client/widgets/menubutton.rb', line 12 def click(item) action(action: Actions::PRESS, value: item) end |
#items ⇒ Array<String>
Returns the list of items available to select from widget.
43 44 45 |
# File 'lib/libyui_client/widgets/menubutton.rb', line 43 def items property(:items).map { |x| x[:label] } end |