class GxtWidgets::GxtGroupingGrid
Attributes
current_platform[R]
Public Class Methods
new(element, platform)
click to toggle source
Calls superclass method
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 13 def initialize(element, platform) super(element,platform) @current_platform = platform end
Public Instance Methods
find_group_index_by_title(group_name, group_elements)
click to toggle source
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 35 def find_group_index_by_title(group_name, group_elements) group_elements.find_index { |grp| grp.name.include? group_name } end
group(group_index)
click to toggle source
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 24 def group(group_index) group_index = find_group_index_by_title(group_index, groups) if group_index.kind_of?(String) return nil unless group_index groups[group_index] end
groups()
click to toggle source
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 18 def groups get_groups.map do |group| initialize_group(group, @current_platform) end end
include_platform_for(platform)
click to toggle source
Calls superclass method
GxtWidgets::GxtGrid#include_platform_for
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 40 def include_platform_for platform super if platform[:platform] == :watir_webdriver require 'gxt-widgets/platforms/watir_webdriver/gxt_grid' self.class.send :include, GxtWidgets::Platforms::WatirWebDriver::GxtGroupingGrid elsif platform[:platform] == :selenium_webdriver require 'gxt-widgets/platforms/selenium_webdriver/gxt_grid' self.class.send :include, GxtWidgets::Platforms::SeleniumWebDriver::GxtGroupingGrid else raise ArgumentError, "expect platform to be :watir_webdriver or :selenium_webdriver" end end
initialize_group(group_element, platform)
click to toggle source
# File lib/gxt-widgets/gxt_grouping_grid.rb, line 30 def initialize_group(group_element, platform) Object::GxtWidgets::GxtGridGroup.new(group_element, self, platform) end