Module: Emf::Emr::Serializer
- Defined in:
- lib/emf/emr/serializer.rb
Class Method Summary collapse
Class Method Details
.call(metafile) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/emf/emr/serializer.rb', line 8 def call() bytes = +"" bytes << .header.to_wire.to_binary_s .records.each do |record| case record when Model::Emr::Records::WireAdapter bytes << record.wire.to_binary_s else raise SerializeError, "cannot serialize #{record.class} (TODO 10 lands domain to_wire)" end end bytes << .trailing bytes end |