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

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

Overview

Represents all columns in a ATSPI::Accessible::Table.

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

Defined Under Namespace

Classes: Selected

Enumerable interface collapse

Selection collapse

Representation collapse

Instance Method Details

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

alias for #at

#at(idx) ⇒ Column

Returns the column at index idx.

Parameters:

  • idx (Integer)

Returns:

  • (Column)

    the column at index idx



22
23
24
25
26
# File 'lib/atspi/accessible/table/columns.rb', line 22

def at(idx)
  super do |mapped_idx|
    Column.new(@native, mapped_idx)
  end
end

#countInteger

Returns its number of columns.

Returns:

  • (Integer)

    its number of columns

See Also:



31
32
33
# File 'lib/atspi/accessible/table/columns.rb', line 31

def count
  @native.n_columns
end

#deselect_alltrue, false Originally defined in module SelectableCollection

Deselects all items

Returns:

  • (true, false)

    indicating success

#eachObject Originally defined in module Collection

prerequisite for Enumerable

#inspectString Originally defined in module SelectableCollection

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

#select_alltrue, false Originally defined in module SelectableCollection

Selects all items

Returns:

  • (true, false)

    indicating success

#selectedSelected Originally defined in module SelectableCollection

Returns its selected subset.

Returns:

#sizeObject Originally defined in module Collection

alias for #count