Class: LanGrove::Protocol::Base
- Defined in:
- lib/langrove/protocol/protocol_base.rb
Overview
protocol |noun| ~ obsessive compulsive notation
eg. #
#
# spread eagled code commentry
#
#
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #decode(data) ⇒ Object
- #encode(data) ⇒ Object
-
#initialize(root, config, name) ⇒ Base
constructor
A new instance of Base.
Methods inherited from Base
Constructor Details
Instance Method Details
#decode(data) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/langrove/protocol/protocol_base.rb', line 26 def decode( data ) # # OVERRIDE # # To decode the data ahead of passing it # into the <Handler>.receive() function. # { :data => data } end |
#encode(data) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/langrove/protocol/protocol_base.rb', line 43 def encode( data ) # # OVERRIDE # # To encode to data ahead of transmit # -ting it to the Client # data[ :data ] end |