Sha256: 4120264f3cfd93f1c474ecbb59ec123e620cf63cf255dc18e6b7eee91750c7bb

Contents?: true

Size: 756 Bytes

Versions: 4

Compression:

Stored size: 756 Bytes

Contents

require 'net/http'
require 'oj'
require 'yaml'
require 'openssl'
require 'faastruby-rpc/version'
require 'faastruby-rpc/function'

(Net::HTTP::SSL_IVNAMES << :@ssl_options).uniq!
(Net::HTTP::SSL_ATTRIBUTES << :options).uniq!

Net::HTTP.class_eval do
  attr_accessor :ssl_options
end

def invoke(function, raise_errors: true)
  function(function, raise_errors: raise_errors)
end

def function(function, raise_errors: true)
  FaaStRuby::RPC::Function.new(function, raise_errors: raise_errors)
end

def require_function(function, as:, raise_errors: true)
  Object.send(:remove_const, as.capitalize) if Object.const_defined?(as.capitalize)
  Object.const_set as.capitalize, FaaStRuby::RPC::Function.new(function, raise_errors: raise_errors)
  return false
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
faastruby-rpc-0.2.3 lib/faastruby-rpc.rb
faastruby-rpc-0.2.2 lib/faastruby-rpc.rb
faastruby-rpc-0.2.1 lib/faastruby-rpc.rb
faastruby-rpc-0.2.0 lib/faastruby-rpc.rb