Class: ProtocolBuffers::Field::Fixed64Field

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

Instance Attribute Summary

Attributes inherited from ProtocolBuffers::Field

#name, #otype, #tag

Instance Method Summary collapse

Methods included from WireFormats::FIXED64

#deserialize, #serialize, #wire_type

Methods inherited from NumericField

#check_value, #default_value, #min

Methods inherited from ProtocolBuffers::Field

#add_methods_to, #add_reader_to, #add_writer_to, #check_valid, #check_value, create, #deserialize, #initialize, #inspect_value, #packed?, #repeated?, #serialize

Instance Method Details

#maxObject



411
412
413
# File 'lib/protocol_buffers/runtime/field.rb', line 411

def max
  0xFFFFFFFF_FFFFFFFF
end

#pack_codeObject



407
408
409
# File 'lib/protocol_buffers/runtime/field.rb', line 407

def pack_code
  'Q'
end

#valid_type?(value) ⇒ Boolean

Returns:

  • (Boolean)


415
416
417
# File 'lib/protocol_buffers/runtime/field.rb', line 415

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