lib/qlang/api/vector_api.rb in qlang-0.0.27180000 vs lib/qlang/api/vector_api.rb in qlang-0.0.27182000

- old
+ new

@@ -1,13 +1,17 @@ module Qlang module Api module VectorApi def execute(nums) - case $type - when :R + case $meta_info.lang + when :r "c(#{nums.join(', ')})" - when :Ruby + when :ruby "Vector[#{nums.join(', ')}]" + when :python + "array([#{nums.join(', ')}])" + else + fail "Vector is not implemented for #{LANGS_HASH[$meta_info.lang.to_s]}" end end module_function :execute end end