Class: Thrift::Processor::UnaryProcessor
- Inherits:
-
BaseProcessor
- Object
- BaseProcessor
- Thrift::Processor::UnaryProcessor
- Defined in:
- lib/thrift/processor.rb
Instance Method Summary collapse
-
#initialize(name, info, middleware, handler) ⇒ UnaryProcessor
constructor
A new instance of UnaryProcessor.
- #process(_seqid, iprot, _oprot) ⇒ Object
Constructor Details
#initialize(name, info, middleware, handler) ⇒ UnaryProcessor
Returns a new instance of UnaryProcessor.
204 205 206 207 208 209 210 |
# File 'lib/thrift/processor.rb', line 204 def initialize(name, info, middleware, handler) @middleware = middleware @handler = handler @arg_keys = info[:args] super name, info[:args_klass] end |
Instance Method Details
#process(_seqid, iprot, _oprot) ⇒ Object
212 213 214 215 216 217 218 219 |
# File 'lib/thrift/processor.rb', line 212 def process(_seqid, iprot, _oprot) @middleware.handle_unary(@name, read_args(iprot)) do |args| @handler.send(@name, *@arg_keys.map { |k| args.send k }) nil end true end |