Class: ATSPI::Accessible::Table::Columns::Selected
- Inherits:
-
Object
- Object
- ATSPI::Accessible::Table::Columns::Selected
- Includes:
- SelectableCollection::Selected
- Defined in:
- lib/atspi/accessible/table/columns/selected.rb
Overview
Represents all selected columns 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) ⇒ Column
The table’s n’th selected column.
-
#count ⇒ Integer
The number of selected columns.
-
#each ⇒ Object
Iterates over all selected columns.
-
#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) ⇒ Column
Returns the table’s n’th selected column.
31 32 33 34 35 |
# File 'lib/atspi/accessible/table/columns/selected.rb', line 31 def at(n) super do |mapped_idx| Column.new(@native, mapped_idx) end end |
#count ⇒ Integer
Returns the number of selected columns.
39 40 41 |
# File 'lib/atspi/accessible/table/columns/selected.rb', line 39 def count @native.n_selected_columns end |
#each ⇒ Object
Iterates over all selected columns
21 22 23 24 25 |
# File 'lib/atspi/accessible/table/columns/selected.rb', line 21 def each @native.selected_columns.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