Class: Lebowski::Foundation::Panes::Support::MenuItemArray
- Inherits:
-
ObjectArray
- Object
- ObjectArray
- Lebowski::Foundation::Panes::Support::MenuItemArray
- Includes:
- Lebowski
- Defined in:
- lib/lebowski/foundation/panes/menu.rb
Constant Summary
Constants included from Lebowski::Foundation
SC_BRANCH_CLOSED, SC_BRANCH_OPEN, SC_BUTTON1_STATUS, SC_BUTTON2_STATUS, SC_BUTTON3_STATUS, SC_LEAF_NODE, SC_MIXED_STATE, SC_PICKER_FIXED, SC_PICKER_MENU, SC_PICKER_POINTER, SC_T_ARRAY, SC_T_BOOL, SC_T_CLASS, SC_T_ERROR, SC_T_FUNCTION, SC_T_HASH, SC_T_NULL, SC_T_NUMBER, SC_T_OBJECT, SC_T_STRING, SC_T_UNDEFINED
Instance Method Summary collapse
- #click(title) ⇒ Object
-
#initialize(parent, *params) ⇒ MenuItemArray
constructor
A new instance of MenuItemArray.
Methods inherited from ObjectArray
#[], #all?, #any?, #count, #each, #empty?, #filter, #find_all, #find_first, #find_indexes, #find_last, #first, #index_of, #last, #member?, #none?, #one?, #prefilter
Constructor Details
#initialize(parent, *params) ⇒ MenuItemArray
Returns a new instance of MenuItemArray.
35 36 37 |
# File 'lib/lebowski/foundation/panes/menu.rb', line 35 def initialize(parent, *params) super(parent, 'menuItemViews', 'length', *params) end |
Instance Method Details
#click(title) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lebowski/foundation/panes/menu.rb', line 39 def click(title) = nil if title.kind_of? String = find_first({ :title => /^#{title}$/i }) elsif title.kind_of? Regexp = find_first({ :title => title }) else raise ArgumentInvalidTypeError.new "title", title, String, Regexp end .click if (not .nil?) end |