Class: Magent::Async::Proxy
- Inherits:
-
Object
- Object
- Magent::Async::Proxy
- Defined in:
- lib/magent/async.rb
Instance Method Summary collapse
- #commit!(method_name, args) ⇒ Object
-
#initialize(queue, target, priority = 3) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(m, *args, &blk) ⇒ Object
Constructor Details
#initialize(queue, target, priority = 3) ⇒ Proxy
Returns a new instance of Proxy.
29 30 31 32 33 34 35 |
# File 'lib/magent/async.rb', line 29 def initialize(queue, target, priority = 3) @queue = queue @target = target @priority = priority @channel = Magent::AsyncChannel.new(@queue) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &blk) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/magent/async.rb', line 47 def method_missing(m, *args, &blk) raise ArgumentError, "ruby blocks are not supported yet" if !blk.nil? commit!(m, args) self end |