Class: ATSPI::Accessible::Table::Cell::Columns

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

Overview

Represents the columns 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) ⇒ Column

Returns the n’th column of the cell.

Parameters:

  • n (Integer)

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

Returns:

  • (Column)

    the n’th column of the cell

See Also:



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

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

#countInteger

Returns the number of columns the cell spans.

Returns:

  • (Integer)

    the number of columns the cell spans

See Also:



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

def count
  row_col_span[4]
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