Class: BERTRPC::Mod
- Inherits:
-
Object
- Object
- BERTRPC::Mod
- Defined in:
- lib/bertrpc/mod.rb
Instance Method Summary collapse
-
#initialize(svc, type, mod) ⇒ Mod
constructor
A new instance of Mod.
- #method_missing(cmd, *args) ⇒ Object
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 |