Module: Google::Protobuf::MessageExts
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/google-protobuf-3.21.12-x86_64-linux/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
36 37 38 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/google-protobuf-3.21.12-x86_64-linux/lib/google/protobuf/message_exts.rb', line 36 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
43 44 45 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/google-protobuf-3.21.12-x86_64-linux/lib/google/protobuf/message_exts.rb', line 43 def to_json( = {}) self.class.encode_json(self, ) end |
#to_proto(options = {}) ⇒ Object
47 48 49 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/google-protobuf-3.21.12-x86_64-linux/lib/google/protobuf/message_exts.rb', line 47 def to_proto( = {}) self.class.encode(self, ) end |