Class: RSC::Package
- Inherits:
-
Object
- Object
- RSC::Package
- Defined in:
- lib/rsc.rb
Instance Method Summary collapse
-
#initialize(drb_obj, package, debug: false) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(drb_obj, package, debug: false) ⇒ Package
Returns a new instance of Package.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rsc.rb', line 26 def initialize(drb_obj, package, debug: false) @debug = debug @obj = drb_obj drb_obj.package_methods(package).each do |method_name| puts ('creating method ' + method_name).info if @debug methodx = " def %s(*args) @obj.run_job('%s','%s', args) end" % [method_name, package, method_name] self.instance_eval(methodx) end end |