# frozen_string_literal: true require 'drb' require 'drb/http0' require 'drb/http0helper' module UU class Remote def self.start_service DRb.start_service end def self.stop_service DRb.stop_service end def initialize(uri) @remote = DRbObject.new_with_uri(uri) end def eval_(code) @remote.eval_(code) end def klass(klass_) @remote.klass(klass_.to_s) end def run(&block) @remote.disable instance_eval(&block) ensure @remote.enable end end end