class Topo::Exporter
Public Class Methods
to_file(file, topo)
click to toggle source
# File lib/topo/exporter.rb, line 6 def self.to_file(file, topo) begin File.open(file, 'w') { |f| f.write(JSON.pretty_generate(topo)) } rescue STDERR.puts "ERROR: Cannot write to topology export file #{f}" end end