Class: Arpie::YAMLProtocol
Overview
A protocol which encodes objects into YAML representation. Messages are arbitary yaml-encodable objects.
Constant Summary
Constants inherited from Protocol
Protocol::CAN_SEPARATE_MESSAGES
Constants included from Arpie
Instance Method Summary collapse
Methods inherited from Protocol
Methods included from Arpie
Instance Method Details
#from(binary) {|YAML.load(binary)| ... } ⇒ Object
332 333 334 335 |
# File 'lib/arpie/protocol.rb', line 332 def from binary yield YAML.load(binary) binary.size end |
#to(object) {|YAML.dump(object)| ... } ⇒ Object
328 329 330 |
# File 'lib/arpie/protocol.rb', line 328 def to object yield YAML.dump(object) end |