Class: DRb::DRbServer::InvokeMethod

Inherits:
Object
  • Object
show all
Includes:
InvokeMethod18Mixin
Defined in:
lib/drb/drb.rb,
lib/drb/drb.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from InvokeMethod18Mixin

#block_yield, #perform_with_block

Constructor Details

#initialize(drb_server, client) ⇒ InvokeMethod

Returns a new instance of InvokeMethod.



1625
1626
1627
1628
# File 'lib/drb/drb.rb', line 1625

def initialize(drb_server, client)
  @drb_server = drb_server
  @client = client
end

Instance Method Details

#performObject



1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
# File 'lib/drb/drb.rb', line 1630

def perform
  begin
    setup_message
  ensure
    @result = nil
    @succ = false
  end

  if @block
    @result = perform_with_block
  else
    @result = perform_without_block
  end
  @succ = true
  case @result
  when Array
    if @msg_id == :to_ary
      @result = DRbArray.new(@result)
    end
  end
  return @succ, @result
rescue NoMemoryError, SystemExit, SystemStackError, SecurityError
  raise
rescue Exception
  @result = $!
  return @succ, @result
end