Class: GrpcMock::Response::BlockValue

Inherits:
Object
  • Object
show all
Defined in:
lib/grpc_mock/response.rb

Instance Method Summary collapse

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