Class: Orchestrated::Proxy

Inherits:
BasicObject
Includes:
Kernel
Defined in:
lib/orchestrated/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(prerequisite, target) ⇒ Proxy

Returns a new instance of Proxy.



5
6
7
8
# File 'lib/orchestrated/base.rb', line 5

def initialize(prerequisite, target)
  @prerequisite = prerequisite
  @target       = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
# File 'lib/orchestrated/base.rb', line 9

def method_missing(sym, *args)
  raise ArgumentError.new('cannot orchestrate with blocks because they are not portable across processes') if block_given?
  Orchestration.create( @target, sym, args, @prerequisite)
end