Sha256: 1350a288d6b0834164470326b66877c4b8a9aee596021bde36a3f07ca889b4be

Contents?: true

Size: 445 Bytes

Versions: 9

Compression:

Stored size: 445 Bytes

Contents

module Hilbert
  module Api
    module FuncApi
      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
      module_function :execute
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hilbert-0.0.2700420 lib/hilbert/api/func_api.rb
hilbert-0.0.2700410 lib/hilbert/api/func_api.rb
hilbert-0.0.2700400 lib/hilbert/api/func_api.rb
hilbert-0.0.2700320 lib/hilbert/api/func_api.rb
hilbert-0.0.2700300 lib/hilbert/api/func_api.rb
hilbert-0.0.2700210 lib/hilbert/api/func_api.rb
hilbert-0.0.2700110 lib/hilbert/api/func_api.rb
hilbert-0.0.2700100 lib/hilbert/api/func_api.rb
hilbert-0.0.2700001 lib/hilbert/api/func_api.rb