Class: GrpcMock::Response::BlockValue
- Inherits:
-
Object
- Object
- GrpcMock::Response::BlockValue
- Defined in:
- lib/grpc_mock/response.rb
Instance Method Summary collapse
- #evaluate(request, call = nil) ⇒ Object
-
#initialize(block) ⇒ BlockValue
constructor
A new instance of BlockValue.
Constructor Details
#initialize(block) ⇒ BlockValue
Returns a new instance of BlockValue.
35 36 37 |
# File 'lib/grpc_mock/response.rb', line 35 def initialize(block) @block = block end |
Instance Method Details
#evaluate(request, call = nil) ⇒ Object
39 40 41 |
# File 'lib/grpc_mock/response.rb', line 39 def evaluate(request, call = nil) @block.call(request, call) end |