Module: Hilbert::Api::FuncApi
- Defined in:
- lib/hilbert/api/func_api.rb
Class Method Summary collapse
Class Method Details
.execute(func_name, args, contents) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/hilbert/api/func_api.rb', line 4 def execute(func_name, args, contents) case $meta_info.lang when :r "#{func_name} <- function(#{ args.join(' ,') }) #{contents}" when :ruby "#{func_name}(#{ args.join(' ,') }) <= #{contents}" else fail "Function is not implemented for #{$meta_info.lang_str}" end end |