Class: DRb::DRbServer::InvokeMethod

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(drb_server, client) ⇒ InvokeMethod

Returns a new instance of InvokeMethod.



1653
1654
1655
1656
# File 'lib/drb/drb.rb', line 1653

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

Instance Method Details

#performObject



1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
# File 'lib/drb/drb.rb', line 1658

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