Module: Protobuf::Message::Serialization::ClassMethods
- Defined in:
- lib/protobuf/message/serialization.rb
Instance Method Summary collapse
- #decode(bytes) ⇒ Object
-
#encode(fields = {}) ⇒ Object
Create a new object with the given values and return the encoded bytes.
Instance Method Details
#decode(bytes) ⇒ Object
10 11 12 |
# File 'lib/protobuf/message/serialization.rb', line 10 def decode(bytes) self.new.decode(bytes) end |
#encode(fields = {}) ⇒ Object
Create a new object with the given values and return the encoded bytes.
15 16 17 |
# File 'lib/protobuf/message/serialization.rb', line 15 def encode(fields = {}) self.new(fields).encode end |