Top Level Namespace

Defined Under Namespace

Modules: Jeka

Constant Summary collapse

ROOT_PATH =
File.expand_path(File.dirname(__FILE__))
TOP_MSG =
"jeka v#{File.open(File.join(File.dirname(__FILE__), '..', 'VERSION'), "r").readlines.join}"

Instance Method Summary collapse

Instance Method Details

#build(options) ⇒ Object



66
67
68
# File 'bin/jeka', line 66

def build(options)
  Jeka::Console::build
end

#cmd(files, options) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'bin/jeka', line 41

def cmd(files, options)
  if not files.length == 1
    puts "ERROR: invalid number of files..."
    return
  end
  
  if not Jeka::Console::add_algorithms(files[0])
    puts "ERROR: No such file or directory..."
    return
  end
  
  case options[:command]
    when :build
      build(options)
    when :run
      run(options)
    when :test
      test(options)
  end
end

#helpObject



75
76
77
# File 'bin/jeka', line 75

def help()
  puts "Usage: jeka run|build [options] file..."
end

#run(options) ⇒ Object



70
71
72
73
# File 'bin/jeka', line 70

def run(options)
  build(options) if options[:b]
  Jeka::Console::run(options[:n], options[:o])
end

#test(options) ⇒ Object



62
63
64
# File 'bin/jeka', line 62

def test(options)
  Jeka::Console::test
end