Module: FaaStRuby::RPC
- Defined in:
- lib/faastruby-rpc/version.rb,
lib/faastruby-rpc/function.rb,
lib/faastruby-rpc/test_helper.rb
Defined Under Namespace
Classes: ExecutionError, Function, TestHelper
Constant Summary
collapse
- VERSION =
'0.1.3'
- @@response =
{}
Class Method Summary
collapse
Class Method Details
.response(path) ⇒ Object
15
16
17
|
# File 'lib/faastruby-rpc/function.rb', line 15
def self.response(path)
@@response[path]
end
|
.stub_call(function_path, &block) ⇒ Object
5
6
7
8
9
10
|
# File 'lib/faastruby-rpc/function.rb', line 5
def self.stub_call(function_path, &block)
helper = TestHelper.new
block.call(helper)
response = Struct.new(:body, :code, :headers, :klass)
@@response[function_path] = response.new(helper.body, helper.code, helper., helper.klass)
end
|
.stub_call?(path) ⇒ Boolean
11
12
13
|
# File 'lib/faastruby-rpc/function.rb', line 11
def self.stub_call?(path)
@@response[path]
end
|