-
-
Save vschiavoni/344d76a34914bcff22f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodes = "" | |
# for each node on the list tl | |
tl.each do |n| | |
nodes << n.to_s << ',' | |
end | |
if nodes.size > 0 | |
nodes = nodes[0, nodes.length - 1] | |
end | |
# add the string into the main "timeline" string | |
timelines << %Q({"time":"#{t}","nodes":[") << nodes << %Q(]"}," |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodes = "" | |
# for each node on the list tl | |
tl.each do |n| | |
nodes = nodes + n.to_s + ',' | |
end | |
if nodes.size > 0 | |
nodes = nodes[0, nodes.length - 1] | |
end | |
# add the string into the main "timeline" string | |
timelines = timelines + '{"time":' + t.to_s + ',"nodes":[' + nodes + ']},' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment