Class: Orchestrated::Proxy

Inherits:
Object show all
Defined in:
lib/orchestrated/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(prerequisite, target) ⇒ Proxy

Returns a new instance of Proxy.



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

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)


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

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