Class: BERTRPC::Mod

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

Instance Method Summary collapse

Constructor Details

#initialize(svc, type, mod) ⇒ Mod

Returns a new instance of Mod.



3
4
5
6
7
# File 'lib/bertrpc/mod.rb', line 3

def initialize(svc, type, mod)
  @svc = svc
  @type = type
  @mod = mod
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(cmd, *args) ⇒ Object



9
10
11
12
# File 'lib/bertrpc/mod.rb', line 9

def method_missing(cmd, *args)
  args = [*args]
  @type.new(@svc, @mod, cmd, args).execute
end