Module: Gio::ListModel
- Includes:
- Enumerable
- Defined in:
- lib/gio2/list-model.rb
Instance Method Summary collapse
Instance Method Details
#[](index) ⇒ Object
28 29 30 |
# File 'lib/gio2/list-model.rb', line 28 def [](index) get_item(index) end |
#each(&block) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/gio2/list-model.rb', line 21 def each(&block) return to_enum(__method__) unless block_given? n_items.times do |i| yield(get_item(i)) end end |