Class: Orchestrated::Proxy
Instance Method Summary collapse
-
#initialize(prerequisite, target) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(sym, *args) ⇒ Object
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
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 |