Class: ProtocolBuffers::Field::SignedVarintField
- Inherits:
-
VarintField
- Object
- ProtocolBuffers::Field
- NumericField
- VarintField
- ProtocolBuffers::Field::SignedVarintField
- Defined in:
- lib/protocol_buffers/runtime/field.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ProtocolBuffers::Field
Instance Method Summary collapse
Methods inherited from VarintField
Methods included from WireFormats::VARINT
Methods inherited from NumericField
#check_value, #default_value, #max, #min
Methods inherited from ProtocolBuffers::Field
#add_methods_to, #add_reader_to, #add_writer_to, #check_valid, #check_value, create, #initialize, #inspect_value, #packed?, #repeated?, #serialize, #text_format, #valid_type?
Instance Method Details
#deserialize(value) ⇒ Object
389 390 391 392 393 394 395 396 |
# File 'lib/protocol_buffers/runtime/field.rb', line 389 def deserialize(value) # This is to handle negatives...they are always 64-bit if value > max value - (1<<64) else value end end |