Module: UniverseCompiler::Universe::Persistence

Includes:
Persistence::Management
Included in:
Base
Defined in:
lib/universe_compiler/universe/persistence.rb

Constant Summary

Constants included from Persistence::Management

Persistence::Management::DEFAULT_ENGINE_NAME

Instance Method Summary collapse

Methods included from Persistence::Management

#persistence_engine, #persistence_engine_name=, #persistence_engines

Instance Method Details

#export(uri) ⇒ Object



8
9
10
11
# File 'lib/universe_compiler/universe/persistence.rb', line 8

def export(uri)
  engine = persistence_engine.new self, uri
  engine.export_universe
end

#import(uri, force: false, stop_on_error: true, &block) ⇒ Object



13
14
15
16
17
18
# File 'lib/universe_compiler/universe/persistence.rb', line 13

def import(uri, force: false, stop_on_error: true, &block)
  engine = persistence_engine.new self, uri
  clear if force
  engine.import_universe recursive: true, stop_on_error: stop_on_error, &block
  resolve_entities_reference
end