Class: MF::Server
- Inherits:
-
Object
- Object
- MF::Server
- Defined in:
- lib/mf.rb
Instance Method Summary collapse
- #handle(fd) ⇒ Object
-
#initialize ⇒ Server
constructor
A new instance of Server.
- #run ⇒ Object
Constructor Details
Instance Method Details
#handle(fd) ⇒ Object
30 31 32 33 |
# File 'lib/mf.rb', line 30 def handle(fd) command, *args = fd.gets.split send(command, *args) if self.responds_to?(command) end |
#run ⇒ Object
26 27 28 |
# File 'lib/mf.rb', line 26 def run handle @sock.accept end |