Sha256: 8c6b99f06bfb99056f3d19619c630e0615b21fb4db69a1802a0419feca35bd9c

Contents?: true

Size: 359 Bytes

Versions: 24

Compression:

Stored size: 359 Bytes

Contents

require 'protobuf/field/float_field'

module Protobuf
  module Field
    class DoubleField < FloatField

      ##
      # Public Instance Methods
      #

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

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

      def wire_type
        WireType::FIXED64
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
protobuffy-3.6.0 lib/protobuf/field/double_field.rb
protobuffy-3.5.1 lib/protobuf/field/double_field.rb
protobuffy-3.4.0 lib/protobuf/field/double_field.rb
protobuffy-3.3.0 lib/protobuf/field/double_field.rb
protobuffy-3.2.0 lib/protobuf/field/double_field.rb
protobuffy-3.1.0 lib/protobuf/field/double_field.rb
protobuf-3.3.6 lib/protobuf/field/double_field.rb
protobuf-3.3.5 lib/protobuf/field/double_field.rb
protobuf-3.3.4 lib/protobuf/field/double_field.rb
protobuf-3.3.3 lib/protobuf/field/double_field.rb
protobuf-3.3.2 lib/protobuf/field/double_field.rb
protobuf-3.3.1 lib/protobuf/field/double_field.rb
protobuf-3.3.0 lib/protobuf/field/double_field.rb
protobuf-3.2.1 lib/protobuf/field/double_field.rb
protobuf-3.2.0 lib/protobuf/field/double_field.rb
protobuf-3.1.0 lib/protobuf/field/double_field.rb
protobuf-3.0.5 lib/protobuf/field/double_field.rb
protobuf-3.0.4 lib/protobuf/field/double_field.rb
protobuf-3.0.3 lib/protobuf/field/double_field.rb
protobuf-3.0.2 lib/protobuf/field/double_field.rb