Method: Twb::Util::CypherPython#render

Defined in:
lib/twb/util/cypherpython.rb

#renderObject



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/twb/util/cypherpython.rb', line 45

def render
  @file = File.open("./ttdoc/#{@fileName}.py",'w')
  @file.puts '# -*- coding: latin-1 -*-'
  @file.puts ' '
  @file.puts 'from py2neo import Graph'
  @file.puts "graph = Graph('http://localhost:7474/db/data', user='#{@user}', password='#{@password}')"
  @file.puts ' '
  renderNodes
  renderEdges
  @file.close
  return @file
end