class ThriftServer::ValidationMiddleware

Public Instance Methods

call(rpc) click to toggle source
# File lib/thrift_server/validation_middleware.rb, line 5
def call(rpc)
  app.call(rpc).tap do |response|
    case response
    when Thrift::Struct, Thrift::Struct_Union
      Thrift::Validator.new.validate response
    end
  end
end