Class: Mxrb::RubyApp::Synchronizer
- Inherits:
-
Object
- Object
- Mxrb::RubyApp::Synchronizer
- Defined in:
- lib/mxrb/ruby_app.rb
Overview
Applies the reversible Ruby domain contract to a generated MPR. Anything outside this contract remains in the native sidecar and is never dropped.
Instance Method Summary collapse
-
#initialize(root, target, manifest: Manifest.load(root)) ⇒ Synchronizer
constructor
A new instance of Synchronizer.
- #synchronize! ⇒ Object
Constructor Details
#initialize(root, target, manifest: Manifest.load(root)) ⇒ Synchronizer
Returns a new instance of Synchronizer.
854 855 856 857 858 |
# File 'lib/mxrb/ruby_app.rb', line 854 def initialize(root, target, manifest: Manifest.load(root)) @root = File.(root) @target = File.(target) @manifest = manifest end |
Instance Method Details
#synchronize! ⇒ Object
860 861 862 863 864 865 866 867 868 869 870 871 |
# File 'lib/mxrb/ruby_app.rb', line 860 def synchronize! Registry.reset! RubyApp.application_files(@root).each { load _1, true } project = Model::Project.open(@target, readonly: false) synchronize_entities(project) project.close project = nil @target ensure project&.close end |