Class | JSON::Editor::Gtk::TreeIter |
In: |
lib/json/editor.rb
|
Parent: | Object |
The Gtk::TreeIter class is reopened and some auxiliary methods are added.
Returns the content of this node.
# File lib/json/editor.rb, line 173 173: def content 174: self[CONTENT_COL] 175: end
Sets the content of this node to value.
# File lib/json/editor.rb, line 178 178: def content=(value) 179: self[CONTENT_COL] = value 180: end
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
Returns the type of this node.
# File lib/json/editor.rb, line 161 161: def type 162: self[TYPE_COL] 163: end