Class: AccessLint::Audit

Inherits:
Object
  • Object
show all
Defined in:
lib/access_lint/audit.rb

Constant Summary collapse

RUNNER_PATH =
File.expand_path("../../../vendor/access-lint/bin/auditor.js", __FILE__)

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Audit

Returns a new instance of Audit.



8
9
10
# File 'lib/access_lint/audit.rb', line 8

def initialize(target)
  @target = target
end

Instance Method Details

#runObject



12
13
14
15
16
17
# File 'lib/access_lint/audit.rb', line 12

def run
  result = `phantomjs #{RUNNER_PATH} #{@target}`
  if !result.nil?
    JSON.parse(result)
  end
end