Module: Mulang

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

Defined Under Namespace

Modules: Expectation, Language Classes: Code, Inspection

Constant Summary collapse

VERSION =
"5.1.0.1"
MULANG_VERSION =
"5.1.0"

Class Method Summary collapse

Class Method Details

.analyse(analysis) ⇒ Object



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

def self.analyse(analysis)
  Open3.popen2(bin_path, '-s') do |input, output, _thread|
    input.puts analysis.to_json
    input.close
    JSON.parse output.read
  end
end

.bin_pathObject



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

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