Class: Arf::RPC::StreamItem

Inherits:
BaseMessage show all
Defined in:
lib/arf/rpc/stream_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseMessage

#decode_bytes, #decode_string, #decode_uint16, encode, #encode_bytes, #encode_string, #encode_uint16, has_metadata, has_status, has_streaming, #initialize, initialize_from, kind, message_by_kind, register

Constructor Details

This class inherits a constructor from Arf::RPC::BaseMessage

Instance Attribute Details

#valueObject

Returns the value of attribute value.



7
8
9
# File 'lib/arf/rpc/stream_item.rb', line 7

def value
  @value
end

Instance Method Details

#decode(data) ⇒ Object



11
12
13
# File 'lib/arf/rpc/stream_item.rb', line 11

def decode(data)
  @value = Proto.decode(data)
end

#encodeObject



9
# File 'lib/arf/rpc/stream_item.rb', line 9

def encode = Proto.encode(@value)