Class: RailsGraph::Commands::ExportGraph

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_graph/commands/export_graph.rb

Constant Summary collapse

EXPORTERS =
{
  cypher: RailsGraph::Exporters::Cypher,
  json: RailsGraph::Exporters::Json,
  neo4j: RailsGraph::Exporters::Neo4j
}.freeze

Class Method Summary collapse

Class Method Details

.call(graph:, format: :cypher, **options) ⇒ Object



16
17
18
# File 'lib/rails_graph/commands/export_graph.rb', line 16

def self.call(graph:, format: :cypher, **options)
  EXPORTERS[format].export(graph: graph, **options)
end