Class: RemoteObject

Inherits:
Object
  • Object
show all
Defined in:
lib/rpc/examples/helpers.rb

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(name, *args)



12
13
14
# File 'lib/rpc/examples/helpers.rb', line 12

def method_missing(name, *args)
  "[SERVER] received method #{name} with #{args.inspect}"
end

Instance Method Details

- (Object) buggy_method



8
9
10
# File 'lib/rpc/examples/helpers.rb', line 8

def buggy_method
  raise "This exception is expected."
end

- (Object) server_timestamp



4
5
6
# File 'lib/rpc/examples/helpers.rb', line 4

def server_timestamp
  Time.now.to_i
end