class Lebowski::Foundation::Panes::Support::MenuItemArray
Public Class Methods
new(parent, *params)
click to toggle source
Calls superclass method
Lebowski::Foundation::ObjectArray::new
# File lib/lebowski/foundation/panes/menu.rb, line 39 def initialize(parent, *params) super(parent, 'items', 'length', *params) @itemTitleKey = @parent['itemTitleKey'] end
Public Instance Methods
click(title)
click to toggle source
# File lib/lebowski/foundation/panes/menu.rb, line 44 def click(title) menu_item = nil if title.kind_of? String menu_item = find_first({ @itemTitleKey => /^#{title}$/i }) elsif title.kind_of? Regexp menu_item = find_first({ @itemTitleKey => title }) else raise ArgumentInvalidTypeError.new "title", title, String, Regexp end menu_item.click if (not menu_item.nil?) end
Protected Instance Methods
create_object(index, expected_type=nil)
click to toggle source
# File lib/lebowski/foundation/panes/menu.rb, line 58 def create_object(index, expected_type=nil) rel_path = "_menuView.childViews.#{index}" return @parent[rel_path, expected_type] end