lib/faastruby-rpc.rb in faastruby-rpc-0.2.3 vs lib/faastruby-rpc.rb in faastruby-rpc-0.2.4
- old
+ new
@@ -19,9 +19,10 @@
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)
+ as[0] = as[0].capitalize
+ Object.send(:remove_const, as) if Object.const_defined?(as)
+ Object.const_set as, FaaStRuby::RPC::Function.new(function, raise_errors: raise_errors)
return false
end