Class: ATSPI::Accessible::Table::Cell::Rows

Inherits:
Object
  • Object
show all
Includes:
SelectableCollection::Selected
Defined in:
lib/atspi/accessible/table/cell/rows.rb

Overview

Represents the rows a table ATSPI::Accessible::Table::Cell spans.

Instance are enumerables supporting item access and can be treated more or less like an array.

Enumerable interface collapse

Representation collapse

Instance Method Details

#[](idx) ⇒ Object Originally defined in module Collection

alias for #at

#at(n) ⇒ Row

Returns the n’th row of the cell.

Parameters:

  • n (Integer)

    the index in the collection of the cell’s rows and not the index in the collection of all the table’s rows.

Returns:

  • (Row)

    the n’th row of the cell

See Also:



26
27
28
29
30
# File 'lib/atspi/accessible/table/cell/rows.rb', line 26

def at(n)
  super do |mapped_idx|
    Row.new(@native.get_parent, @first_idx+mapped_idx)
  end
end

#countInteger

Returns the number of rows the cell spans.

Returns:

  • (Integer)

    the number of rows the cell spans

See Also:



35
36
37
# File 'lib/atspi/accessible/table/cell/rows.rb', line 35

def count
  row_col_span[3]
end

#eachObject Originally defined in module Collection

prerequisite for Enumerable

#inspectString Originally defined in module SelectableCollection::Selected

Returns instance as inspectable string.

Returns:

  • (String)

    instance as inspectable string

#last(n = 1) ⇒ Object+ Originally defined in module Collection

Returns item(s) from the end.

Parameters:

  • n (Integer) (defaults to: 1)

    number of items to return

Returns:

  • (Object, Array<Object>)

    item(s) from the end

#lengthObject Originally defined in module Collection

alias for #count

#sizeObject Originally defined in module Collection

alias for #count