Class: Protobuf::Field::StringField
- Inherits:
-
BytesField
- Object
- BaseField
- BytesField
- Protobuf::Field::StringField
- Defined in:
- lib/protobuf/message/field.rb
Instance Attribute Summary
Attributes inherited from BaseField
#default, #message_class, #name, #rule, #tag, #type
Instance Method Summary collapse
Methods inherited from BytesField
#acceptable?, default, #encode, #wire_type
Methods inherited from BaseField
#acceptable?, #clear, default, #default_value, descriptor, #descriptor, #error_message, #get, #initialize, #initialized?, #max, #merge, #merge_array, #merge_value, #min, #optional?, #ready?, #repeated?, #required?, #set, #to_s, #typed_default_value
Constructor Details
This class inherits a constructor from Protobuf::Field::BaseField
Instance Method Details
#decode(bytes) ⇒ Object
304 305 306 307 308 |
# File 'lib/protobuf/message/field.rb', line 304 def decode(bytes) = bytes.pack('C*') .force_encoding('UTF-8') if .respond_to?(:force_encoding) end |