Sha256: f77ff8a351e97d6c444c0492cc8bdbd65f8e772ab0901069bcdd6a3fcbd63cfa

Contents?: true

Size: 373 Bytes

Versions: 73

Compression:

Stored size: 373 Bytes

Contents

require 'protobuf/field/uint32_field'

module Protobuf
  module Field
    class Fixed32Field < Uint32Field

      ##
      # Public Instance Methods
      #

      def decode(bytes)
        bytes.unpack('V').first
      end

      def encode(value)
        [value].pack('V')
      end

      def wire_type
        ::Protobuf::WireType::FIXED32
      end

    end
  end
end

Version data entries

73 entries across 73 versions & 6 rubygems

Version Path
protobuf-cucumber-3.10.4 lib/protobuf/field/fixed32_field.rb
protobuf-3.10.3 lib/protobuf/field/fixed32_field.rb
protobuf-3.10.2 lib/protobuf/field/fixed32_field.rb
protobuf-3.10.1 lib/protobuf/field/fixed32_field.rb
protobuf-3.10.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.10.0.pre0 lib/protobuf/field/fixed32_field.rb
protobuf-3.9.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.9.0.pre2 lib/protobuf/field/fixed32_field.rb
protobuf-3.9.0.pre lib/protobuf/field/fixed32_field.rb
protobuf-3.8.5 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.5.pre0 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.4 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.3 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.2 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.1 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.8.0.pre1 lib/protobuf/field/fixed32_field.rb
protobuf-core-3.5.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.7.5 lib/protobuf/field/fixed32_field.rb
protobuf-3.7.4 lib/protobuf/field/fixed32_field.rb