Class: WavesLib::Wrapper
- Inherits:
-
Object
- Object
- WavesLib::Wrapper
- Extended by:
- T::Sig
- Defined in:
- lib/waves_lib/wrapper.rb
Overview
Contains functions of waves library module
Instance Method Summary collapse
-
#initialize(socket, paths) ⇒ Wrapper
constructor
A new instance of Wrapper.
Constructor Details
#initialize(socket, paths) ⇒ Wrapper
Returns a new instance of Wrapper.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/waves_lib/wrapper.rb', line 10 def initialize(socket, paths) @socket = T.let(socket, TCPSocket) paths.each do |path| method = path.split(".")[-1] define_singleton_method method.to_s do |*args| invoke(path, args) end end end |