This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_2_180) is shown here.
create_node(parent, type, content)
public
Create a type node with content content, and add it to
parent in the model. If parent is nil, create a new model and put it
into the editor treeview.
# File ext/json/lib/json/editor.rb, line 817
def create_node(parent, type, content)
iter = if parent
model.append(parent)
else
new_model = Editor.data2model(nil)
toplevel.view_new_model(new_model)
new_model.iter_first
end
iter.type, iter.content = type, content
expand_collapse(parent) if parent
iter
end