lib/mohawk/accessors.rb
def table(name, locator)
      define_method("#{name}") do
        adapter.table(locator)
      end
      define_method("#{name}=") do |which_item|
        adapter.table(locator).select which_item
      end
      define_method("add_#{name}") do |hash_info|
        adapter.table(locator).add hash_info
      end
      define_method("select_#{name}") do |hash_info|
        adapter.table(locator).select hash_info
      end
      define_method("find_#{name}") do |hash_info|
        adapter.table(locator).find_row_with hash_info
      end
      define_method("clear_#{name}") do |hash_info|
        adapter.table(locator).clear hash_info
      end
      define_method("#{name}_headers") do
        adapter.table(locator).headers
      end
      define_method("#{name}_view") do
        adapter.table(locator).view
      end
    end
def table(name, locator)
      define_method("#{name}") do
        adapter.table(locator)
      end
      define_method("#{name}=") do |which_item|
        adapter.table(locator).select which_item
      end
      define_method("add_#{name}") do |hash_info|
        adapter.table(locator).add hash_info
      end
      define_method("select_#{name}") do |hash_info|
        adapter.table(locator).select hash_info
      end
      define_method("find_#{name}") do |hash_info|
        adapter.table(locator).find_row_with hash_info
      end
      define_method("clear_#{name}") do |hash_info|
        adapter.table(locator).clear hash_info
      end
      define_method("#{name}_headers") do
        adapter.table(locator).headers
      end
      define_method("#{name}_view") do
        adapter.table(locator).view
      end
    end
Generates methods for working with table or list view controls

 @example
   table(:some_table, :id => "tableId")
   # will generate 'some_table', 'some_table=', 'some_table_headers', 'select_some_table', 'clear_some_table',
   # find_some_table and 'some_table_view' methods to get an Enumerable of table rows,
   # select a table item, clear a table item, return all of the headers and get the raw view

 @param  [String]  the name used for the generated methods
 @param  [Hash]  locator for how the label is found

 === Aliases
 * listview
 * list_view