Module: VirtualModule
- Defined in:
- lib/virtual_module.rb,
lib/virtual_module/version.rb
Defined Under Namespace
Modules: Helper, SexpParser Classes: BaseIpcInterface, BaseSourceProvider, Builder, FileIpcInterface, JuliaSourceProvider, PythonSourceProvider, RpcIpcInterface, RuntimeException
Constant Summary collapse
- VERSION =
"0.3.1"
Class Method Summary collapse
Class Method Details
.new(**args) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/virtual_module.rb', line 13 def new(**args) format_args = ->(key){ if args.keys.include?(key) args[:lang] = key args[:pkgs] = args[key] args[:transpiler] ||= nil if key == :python end } [:python, :julia].map{|e| format_args.call(e)} option = {:lang=>:julia, :methods=>"", :transpiler=>->(s){Julializer.ruby2julia(s)}, :pkgs=>[], :ipc=>:file}.merge(args) vm_builder = Builder.new(option) vm_builder.add(option[:methods]) vm_builder.build end |