Sha256: 9d27bcfd5b670356609efa36df5e9d8de91a7d27c5d2aae68ecb4574da5c6150

Contents?: true

Size: 848 Bytes

Versions: 341

Compression:

Stored size: 848 Bytes

Contents

# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc.  All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

module Google
  module Protobuf
    module MessageExts

      #this is only called in jruby; mri loades the ClassMethods differently
      def self.included(klass)
        klass.extend(ClassMethods)
      end

      module ClassMethods
      end

      def to_json(options = {})
        self.class.encode_json(self, options)
      end

      def to_proto(options = {})
        self.class.encode(self, options)
      end

    end
    class AbstractMessage
      include MessageExts
      extend MessageExts::ClassMethods
    end
    private_constant :AbstractMessage
  end
end

Version data entries

341 entries across 341 versions & 2 rubygems

Version Path
google-protobuf-4.29.0.rc.3-aarch64-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-java lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2 lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x86_64-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x86_64-darwin lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x86-mingw32 lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x86-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x64-mingw32 lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-x64-mingw-ucrt lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-arm64-darwin lib/google/protobuf/message_exts.rb
google-protobuf-4.29.0.rc.2-aarch64-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-java lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3 lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x86_64-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x86_64-darwin lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x86-mingw32 lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x86-linux lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x64-mingw32 lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-x64-mingw-ucrt lib/google/protobuf/message_exts.rb
google-protobuf-4.28.3-arm64-darwin lib/google/protobuf/message_exts.rb