Class: ProtocolBuffers::Field::BytesField
- Inherits:
-
ProtocolBuffers::Field
- Object
- ProtocolBuffers::Field
- ProtocolBuffers::Field::BytesField
- Includes:
- WireFormats::LENGTH_DELIMITED
- Defined in:
- lib/protocol_buffers/runtime/field.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ProtocolBuffers::Field
Instance Method Summary collapse
Methods included from WireFormats::LENGTH_DELIMITED
Methods inherited from ProtocolBuffers::Field
#add_methods_to, #check_valid, #check_value, create, #deserialize, #initialize, #inspect_value, #repeated?, #serialize
Constructor Details
This class inherits a constructor from ProtocolBuffers::Field
Instance Method Details
#default_value ⇒ Object
253 254 255 |
# File 'lib/protocol_buffers/runtime/field.rb', line 253 def default_value @default_value || @default_value = (@opts[:default] || "").freeze end |
#valid_type?(value) ⇒ Boolean
249 250 251 |
# File 'lib/protocol_buffers/runtime/field.rb', line 249 def valid_type?(value) value.is_a?(String) end |