FileTree: Allow output as hash, convert to JSON separately

This commit is contained in:
Sebastian Serth
2022-10-04 15:12:18 +02:00
committed by Sebastian Serth
parent ad8743a7d0
commit fb9672c7a4
5 changed files with 12 additions and 8 deletions

View File

@ -77,6 +77,10 @@ class FileTree
core: {
data: @root.children.map {|child| map_to_js_tree(child) },
},
}.to_json
}
end
def to_js_tree_in_json
to_js_tree.to_json
end
end