Sha256: cfb91941b304e35883d644bf81d05034488af9cea329e59ffe507025cc9acaca

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

class AlgorithmDouble < Jeka::Algorithm
  
  add_tests File.join(File.dirname(__FILE__), '_tests', '**', '_test_*.rb')
  
  implementation 'c++' do |imp|
    imp.information = {language: 'c++', comment: 'Simple implementation in C++'}
    imp.compiler = Jeka::Compiler::Gpp.new([File.join(File.dirname(__FILE__), 'cpp', 'double.cpp')], {:o => 'double_cpp'})
  end
  
  implementation 'c' do |imp|
    imp.information = {language: 'c', comment: 'Simple implementation in C'}
    imp.compiler = Jeka::Compiler::Gcc.new([File.join(File.dirname(__FILE__), 'c', 'double.c')], {:o => 'double_c'})
  end
  
  implementation 'obj-c' do |imp|
    imp.information = {language: 'objective-c', comment: 'Simple implementation in Objective-C'}
    imp.compiler = Jeka::Compiler::Gcc.new([File.join(File.dirname(__FILE__), 'objc', 'double.m')], {:o => 'double_objc', :ObjC => "", :framework => "Foundation"})
  end
  
  implementation 'ruby' do |imp|
    imp.information = {language: 'ruby', comment: 'Simple implementation in Ruby'}
    imp.compiler = Jeka::Compiler::Ruby.new(File.join(File.dirname(__FILE__), 'ruby', 'double.rb'))
  end
  
  implementation 'python' do |imp|
    imp.information = {language: 'python', comment: 'Simple implementation in Python'}
    imp.compiler = Jeka::Compiler::Python.new(File.join(File.dirname(__FILE__), 'python', 'double.py'))
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jeka-0.2.3 test/double/algorithm_double.rb
jeka-0.2.2 test/double/algorithm_double.rb
jeka-0.2.1 test/double/algorithm_double.rb