Module: Mulang

Defined in:
lib/mulang.rb,
lib/mulang/code.rb,
lib/mulang/sexp.rb,
lib/mulang/tokens.rb,
lib/mulang/version.rb,
lib/mulang/inspection.rb

Defined Under Namespace

Modules: Expectation, Language, RunMode, Sexp, Tokens Classes: Code, Inspection

Constant Summary collapse

VERSION =
"6.12.0"
MULANG_VERSION =
"6.12.0"

Class Method Summary collapse

Class Method Details

.analyse(analysis, **options) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/mulang.rb', line 12

def self.analyse(analysis, **options)
  arg, mode = Mulang::RunMode.for analysis, options
  Open3.popen2(bin_path, arg) do |input, output, _thread|
    input.puts mode.input(analysis).to_json
    input.close
    result = JSON.parse output.read
    mode.output result
  end
end

.bin_pathObject



9
10
11
# File 'lib/mulang.rb', line 9

def self.bin_path
  File.join(__dir__, '..', 'bin', 'mulang')
end