Class | JSON::Editor::Gtk::TreeIter |
In: |
lib/json/editor.rb
|
Parent: | Object |
The Gtk::TreeIter class is reopened and some auxiliary methods are added.
Traverse each of this Gtk::TreeIter instance‘s children and yield to them.
# File lib/json/editor.rb, line 139 139: def each 140: n_children.times { |i| yield nth_child(i) } 141: end
Recursively traverse all nodes of this Gtk::TreeIter‘s subtree (including self) and yield to them.
# File lib/json/editor.rb, line 145 145: def recursive_each(&block) 146: yield self 147: each do |i| 148: i.recursive_each(&block) 149: end 150: end
Remove the subtree of this Gtk::TreeIter instance from the model model.
# File lib/json/editor.rb, line 154 154: def remove_subtree(model) 155: while current = first_child 156: model.remove(current) 157: end 158: end