Class: Protopuffs::Bytes
- Inherits:
-
LengthDelimited
- Object
- MessageField
- LengthDelimited
- Protopuffs::Bytes
- Defined in:
- lib/protopuffs/message/field.rb
Instance Attribute Summary
Attributes inherited from MessageField
Class Method Summary collapse
Instance Method Summary collapse
- #decode(bytes) ⇒ Object
-
#initialize(modifier, identifier, tag, default = nil) ⇒ Bytes
constructor
A new instance of Bytes.
Methods inherited from LengthDelimited
Methods inherited from MessageField
factory, #key, #optional?, #repeated?, shift_tag, #to_wire_format_with_value
Constructor Details
#initialize(modifier, identifier, tag, default = nil) ⇒ Bytes
Returns a new instance of Bytes.
198 199 200 |
# File 'lib/protopuffs/message/field.rb', line 198 def initialize(modifier, identifier, tag, default = nil) super end |
Class Method Details
Instance Method Details
#decode(bytes) ⇒ Object
204 205 206 |
# File 'lib/protopuffs/message/field.rb', line 204 def decode(bytes) bytes.respond_to?(:force_encoding) ? bytes.force_encoding("BINARY") : bytes end |