Module: ProtocolBuffers::Field::WireFormats::FIXED32

Included in:
Fixed32Field, FloatField, Sfixed32Field
Defined in:
lib/protocol_buffers/runtime/field.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(value) ⇒ Object



267
268
269
# File 'lib/protocol_buffers/runtime/field.rb', line 267

def deserialize(value)
  value.unpack(pack_code).first
end

#serialize(value) ⇒ Object



263
264
265
# File 'lib/protocol_buffers/runtime/field.rb', line 263

def serialize(value)
  [value].pack(pack_code)
end

#wire_typeObject



259
260
261
# File 'lib/protocol_buffers/runtime/field.rb', line 259

def wire_type
  WireTypes::FIXED32
end