Class: MessagePack::RPCOverHTTP::Server::Streamer::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/msgpack/rpc_over_http/server/streamer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&proc) ⇒ Body

Returns a new instance of Body.



12
13
14
# File 'lib/msgpack/rpc_over_http/server/streamer.rb', line 12

def initialize(&proc)
  @proc = proc
end

Instance Attribute Details

#msgidObject

Returns the value of attribute msgid.



10
11
12
# File 'lib/msgpack/rpc_over_http/server/streamer.rb', line 10

def msgid
  @msgid
end

Instance Method Details

#each(&block) ⇒ Object



16
17
18
19
# File 'lib/msgpack/rpc_over_http/server/streamer.rb', line 16

def each(&block)
  @proc.call(msgid, block)
  return self
end