Class: ProtocolBuffers::Field::Int32Field

Inherits:
SignedVarintField show all
Defined in:
lib/protocol_buffers/runtime/field.rb

Direct Known Subclasses

EnumField, Sint32Field

Instance Attribute Summary

Attributes inherited from ProtocolBuffers::Field

#name, #otype, #tag

Instance Method Summary collapse

Methods inherited from SignedVarintField

#deserialize

Methods inherited from VarintField

#valid_type?

Methods included from WireFormats::VARINT

#wire_type

Methods inherited from NumericField

#check_value, #default_value

Methods inherited from ProtocolBuffers::Field

#add_methods_to, #check_valid, #check_value, create, #deserialize, #initialize, #inspect_value, #repeated?, #serialize, #valid_type?

Instance Method Details

#bitsObject



365
366
367
# File 'lib/protocol_buffers/runtime/field.rb', line 365

def bits
  32
end

#maxObject



361
362
363
# File 'lib/protocol_buffers/runtime/field.rb', line 361

def max
  (1 << 31) - 1
end

#minObject



357
358
359
# File 'lib/protocol_buffers/runtime/field.rb', line 357

def min
  -(1 << 31)
end