Module: Cmdserver::CmdProtocol
- Defined in:
- lib/cmdserver.rb
Class Method Summary collapse
- .default(cs, args) ⇒ Object
- .default_action(cs, args) ⇒ Object
- .extend_protocol ⇒ Object
- .getProtocolHash ⇒ Object
Class Method Details
.default(cs, args) ⇒ Object
29 30 31 32 |
# File 'lib/cmdserver.rb', line 29 def default(cs, args) # NOTE: args is a String self.default_action(cs, args) end |
.default_action(cs, args) ⇒ Object
17 18 19 |
# File 'lib/cmdserver.rb', line 17 def self.default_action(cs, args) cs.puts args end |
.extend_protocol ⇒ Object
11 12 13 14 15 |
# File 'lib/cmdserver.rb', line 11 def self.extend_protocol() @protocol_hash = { "dummy" => -> cs, args { cs.puts "Dummy reply"} } end |
.getProtocolHash ⇒ Object
22 23 24 25 |
# File 'lib/cmdserver.rb', line 22 def getProtocolHash() self.extend_protocol() return @protocol_hash end |