Class: ProtocolBuffers::Field::VarintField

Inherits:
NumericField show all
Includes:
WireFormats::VARINT
Defined in:
lib/protocol_buffers/runtime/field.rb

Direct Known Subclasses

BoolField, SignedVarintField, Uint32Field, Uint64Field

Instance Attribute Summary

Attributes inherited from ProtocolBuffers::Field

#name, #otype, #tag

Instance Method Summary collapse

Methods included from WireFormats::VARINT

#wire_type

Methods inherited from NumericField

#check_value, #default_value, #max, #min

Methods inherited from ProtocolBuffers::Field

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

Instance Method Details

#valid_type?(value) ⇒ Boolean

Returns:

  • (Boolean)


293
294
295
# File 'lib/protocol_buffers/runtime/field.rb', line 293

def valid_type?(value)
  value.is_a?(Integer)
end