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



226
227
228
# File 'lib/protocol_buffers/runtime/field.rb', line 226

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

#serialize(value) ⇒ Object



222
223
224
# File 'lib/protocol_buffers/runtime/field.rb', line 222

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

#wire_typeObject



218
219
220
# File 'lib/protocol_buffers/runtime/field.rb', line 218

def wire_type
  WireTypes::FIXED32
end