Sha256: c270747ac435a00e21b37135ccdd43513a9543d2ea6785ac0cdb592d82277d56
Contents?: true
Size: 417 Bytes
Versions: 3
Compression:
Stored size: 417 Bytes
Contents
# encoding: utf-8 require 'English' module Pio # Macros for defining message types. module MessageTypeSelector def message_type(options) const_set(:MESSAGE_TYPE, options) end def read(raw_data) parsed = const_get(:Format).read(raw_data) const_get(:MESSAGE_TYPE)[parsed.message_type].create_from parsed rescue raise Pio::ParseError, $ERROR_INFO.message end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pio-0.8.1 | lib/pio/message_type_selector.rb |
pio-0.8.0 | lib/pio/message_type_selector.rb |
pio-0.7.0 | lib/pio/message_type_selector.rb |