Module: Google::Protobuf::MessageExts
- Defined in:
- lib/google/protobuf/message_exts.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(klass) ⇒ Object
this is only called in jruby; mri loades the ClassMethods differently.
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
this is only called in jruby; mri loades the ClassMethods differently
13 14 15 |
# File 'lib/google/protobuf/message_exts.rb', line 13 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
20 21 22 |
# File 'lib/google/protobuf/message_exts.rb', line 20 def to_json( = {}) self.class.encode_json(self, ) end |
#to_proto(options = {}) ⇒ Object
24 25 26 |
# File 'lib/google/protobuf/message_exts.rb', line 24 def to_proto( = {}) self.class.encode(self, ) end |