Class: YuiRestClient::Widgets::Tree
- Defined in:
- lib/yui_rest_client/widgets/tree.rb
Overview
Class representing a tree in UI. It can be YTree.
Instance Method Summary collapse
-
#items ⇒ Array<String>
Returns the list of items available to select from tree.
-
#select(item) ⇒ Object
Sends action to select an item from the tree in UI.
-
#selected_item ⇒ String
Returns the item currently selected/highlighted in the tree.
Methods inherited from Base
#action, #collect_all, #debug_label, #enabled?, #exists?, #initialize, #property
Methods included from YuiRestClient::Waitable
Constructor Details
This class inherits a constructor from YuiRestClient::Widgets::Base
Instance Method Details
#items ⇒ Array<String>
Returns the list of items available to select from tree. Each item is represented by its path from root node to leaf in the tree, in other words, a list of nodes separated by special simbol ‘|’
61 62 63 |
# File 'lib/yui_rest_client/widgets/tree.rb', line 61 def items get_nodes(property(:items)) end |
#select(item) ⇒ Object
Sends action to select an item from the tree in UI.
69 70 71 72 |
# File 'lib/yui_rest_client/widgets/tree.rb', line 69 def select(item) action(action: Actions::SELECT, value: item) self end |
#selected_item ⇒ String
Returns the item currently selected/highlighted in the tree. Item is represented by its path from root node to leaf in the tree, in other words, a list of nodes separated by special simbol ‘|’
123 124 125 |
# File 'lib/yui_rest_client/widgets/tree.rb', line 123 def selected_item get_selected_node(property(:items)) end |