Class: Protopuffs::LengthDelimited
Instance Attribute Summary
Attributes inherited from MessageField
#default, #identifier, #tag
Class Method Summary
collapse
Instance Method Summary
collapse
factory, #key, #optional?, #repeated?, shift_tag, #to_wire_format_with_value
Class Method Details
.shift(buffer) ⇒ Object
173
174
175
176
177
|
# File 'lib/protopuffs/message/field.rb', line 173
def self.shift(buffer)
bytes = VarInt.shift(buffer)
value_length = VarInt.decode(bytes)
buffer.read(value_length)
end
|
Instance Method Details
#decode(bytes) ⇒ Object
178
|
# File 'lib/protopuffs/message/field.rb', line 178
def decode(bytes); bytes end
|