Class: InvokeMethod
- Inherits:
-
Object
- Object
- InvokeMethod
- Defined in:
- lib/opal/drb/invoke_method.rb
Instance Method Summary collapse
-
#initialize(drb_server, client) ⇒ InvokeMethod
constructor
A new instance of InvokeMethod.
- #perform ⇒ Object
Constructor Details
#initialize(drb_server, client) ⇒ InvokeMethod
Returns a new instance of InvokeMethod.
2 3 4 5 |
# File 'lib/opal/drb/invoke_method.rb', line 2 def initialize(drb_server, client) @drb_server = drb_server @client = client end |
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/opal/drb/invoke_method.rb', line 7 def perform @result = nil @succ = false if @block @result = perform_with_block else @result = perform_without_block end @succ = true if @msg_id == :to_ary && @result.class == Array @result = DRbArray.new(@result) end return @succ, @result rescue StandardError, ScriptError, Interrupt @result = $! return @succ, @result end |