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
# Week 09 | |
# Last week we built our first class. | |
# | |
# Remember, in Ruby, we usually group data and functions together into | |
# things we call "objects". | |
# | |
# An object, is a specific example of a "class". For example, Fred might | |
# be an object from the class Person. |
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
# So the problem is inserting data into neo using the batch API. So we have a bunch of people and we want to put them into the graph and also | |
# add to to the index so that we can search for them. | |
# The way the batch API works is that you can refer to previous commands by referencing their index in the list of commands (zero indexed) | |
# e.g. if I want to reference the person added in the first command I would reference that node as {0} | |
# You should be able to see how that works in the code below. | |
neo_people_to_load = | |
[{ :name => "Mark Needham", :id => 1 }, | |
{ :name => "Jenn Smith", :id => 2 }, | |
{ :name => "Chris Ford", :id => 3 }] |