Module: Cmdserver::Cmdprotocol
- Defined in:
- lib/cmdserver/cmdprotocol.rb
Class Method Summary collapse
-
.default(cs, args) ⇒ Object
Default behaviour when querry was not found.
- .default_action(cs, args) ⇒ Object
- .extend_protocol ⇒ Object
- .get_protocol_hash ⇒ Object
Class Method Details
.default(cs, args) ⇒ Object
Default behaviour when querry was not found
23 24 25 26 |
# File 'lib/cmdserver/cmdprotocol.rb', line 23 def default(cs, args) # NOTE: args is a String default_action(cs, args) end |
.default_action(cs, args) ⇒ Object
13 14 15 |
# File 'lib/cmdserver/cmdprotocol.rb', line 13 def default_action(cs, args) cs.puts args end |
.extend_protocol ⇒ Object
7 8 9 10 11 |
# File 'lib/cmdserver/cmdprotocol.rb', line 7 def extend_protocol() @protocol = { "dummy" => -> cs, args { cs.puts "Dummy reply"} } end |
.get_protocol_hash ⇒ Object
17 18 19 20 |
# File 'lib/cmdserver/cmdprotocol.rb', line 17 def get_protocol_hash() extend_protocol() return @protocol end |