Class: ATSPI::Accessible::Children::Selected

Inherits:
Object
  • Object
show all
Includes:
SelectableCollection::Selected
Defined in:
lib/atspi/accessible/children/selected.rb

Overview

Wraps libatspi’s AtspiSelection together with parts of Selectable and ATSPI::Accessible::Children

Enumerable interface collapse

Representation collapse

Instance Method Details

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

alias for #at

#at(idx) ⇒ Accessible

Returns its child at index idx.

Parameters:

  • idx (Integer)

Returns:

See Also:



18
19
20
21
22
# File 'lib/atspi/accessible/children/selected.rb', line 18

def at(idx)
  super do |mapped_idx|
    Accessible.new(@native.selected_child(mapped_idx))
  end
end

#countInteger

Returns its number of children.

Returns:

  • (Integer)

    its number of children

See Also:



27
28
29
# File 'lib/atspi/accessible/children/selected.rb', line 27

def count
  @native.n_selected_children
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