Module: ATSPI::SelectableCollection::Selected
- Includes:
- Collection
- Included in:
- Accessible::Children::Selected, Accessible::Table::Cell::Columns, Accessible::Table::Cell::Rows, Accessible::Table::Columns::Selected, Accessible::Table::Rows::Selected
- Defined in:
- lib/atspi/selectable_collection/selected.rb
Overview
Included in classes representing the selected subset of a selectable collection
Representation collapse
-
#inspect ⇒ String
Instance as inspectable string.
Enumerable interface collapse
-
#[](idx) ⇒ Object
included
from Collection
alias for Collection#at.
-
#at(idx) ⇒ Object
included
from Collection
Item at index
idx
. -
#count ⇒ 0
included
from Collection
Default size of collection.
-
#each ⇒ Object
included
from Collection
prerequisite for Enumerable.
-
#last(n = 1) ⇒ Object+
included
from Collection
Item(s) from the end.
-
#length ⇒ Object
included
from Collection
alias for Collection#count.
-
#size ⇒ Object
included
from Collection
alias for Collection#count.
Instance Method Details
#[](idx) ⇒ Object Originally defined in module Collection
alias for #at
#at(idx) ⇒ Object Originally defined in module Collection
Returns item at index idx
.
#count ⇒ 0 Originally defined in module Collection
Returns default size of collection.
#each ⇒ Object Originally defined in module Collection
prerequisite for Enumerable
#inspect ⇒ String
Returns instance as inspectable string.
16 17 18 19 20 |
# File 'lib/atspi/selectable_collection/selected.rb', line 16 def inspect indices = self.indices(limit: 5).inspect indices[-1] = ", …]" if count > 5 "#<#{self.class.name}:0x#{'%x14' % __id__} @count=#{count} @indices=#{indices}>" end |
#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