Class: Graphable::NodeCreator
- Inherits:
-
Object
- Object
- Graphable::NodeCreator
- Extended by:
- Forwardable
- Defined in:
- lib/graphable/node_creator.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(klass) ⇒ NodeCreator
constructor
A new instance of NodeCreator.
Constructor Details
#initialize(klass) ⇒ NodeCreator
Returns a new instance of NodeCreator.
10 11 12 |
# File 'lib/graphable/node_creator.rb', line 10 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
7 8 9 |
# File 'lib/graphable/node_creator.rb', line 7 def klass @klass end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/graphable/node_creator.rb', line 14 def call puts "Building nodes for #{name}" all.each_slice(100) do |slice| slice.each do |object| Graphable.index_cache[object] = Neography::Node.create(object.to_node) end end end |