Class: ATSPI::Accessible::Table::Rows::Selected
- Inherits:
-
Object
- Object
- ATSPI::Accessible::Table::Rows::Selected
- Includes:
- SelectableCollection::Selected
- Defined in:
- lib/atspi/accessible/table/rows/selected.rb
Overview
Represents all selected rows of a ATSPI::Accessible::Table.
Instance are enumerables supporting item access and can be treated more or less like an array.
Enumerable interface collapse
-
#[](idx) ⇒ Object
included
from Collection
alias for #at.
-
#at(n) ⇒ Row
The table’s n’th selected row.
-
#count ⇒ Integer
The number of selected rows.
-
#each ⇒ Object
Iterates over all selected rows.
-
#last(n = 1) ⇒ Object+
included
from Collection
Item(s) from the end.
-
#length ⇒ Object
included
from Collection
alias for #count.
-
#size ⇒ Object
included
from Collection
alias for #count.
Representation collapse
-
#inspect ⇒ String
included
from SelectableCollection::Selected
Instance as inspectable string.
Instance Method Details
#[](idx) ⇒ Object Originally defined in module Collection
alias for #at
#at(n) ⇒ Row
Returns the table’s n’th selected row.
31 32 33 34 35 |
# File 'lib/atspi/accessible/table/rows/selected.rb', line 31 def at(n) super do |idx| Row.new(@native, idx) end end |
#count ⇒ Integer
Returns the number of selected rows.
39 40 41 |
# File 'lib/atspi/accessible/table/rows/selected.rb', line 39 def count @native.n_selected_rows end |
#each ⇒ Object
Iterates over all selected rows
21 22 23 24 25 |
# File 'lib/atspi/accessible/table/rows/selected.rb', line 21 def each @native.selected_rows.each do |idx| yield at(idx) end end |
#inspect ⇒ String Originally defined in module SelectableCollection::Selected
Returns instance as inspectable string.
#last(n = 1) ⇒ Object+ Originally defined in module Collection
Returns item(s) from the end.
#length ⇒ Object Originally defined in module Collection
alias for #count
#size ⇒ Object Originally defined in module Collection
alias for #count