Class: CodeHunter::Brakeman::Invoker

Inherits:
Object
  • Object
show all
Extended by:
MethodLogger
Defined in:
lib/code_hunter/brakeman/invoker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MethodLogger

log

Constructor Details

#initialize(options = {}) ⇒ Invoker

Returns a new instance of Invoker.



8
9
10
# File 'lib/code_hunter/brakeman/invoker.rb', line 8

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/code_hunter/brakeman/invoker.rb', line 6

def options
  @options
end

Instance Method Details

#invokeObject



12
13
14
15
16
17
18
19
# File 'lib/code_hunter/brakeman/invoker.rb', line 12

def invoke
  system(
    "brakeman",
    "--output", Brakeman::TEMPORAL_PATHNAME.to_s,
    :out => IO::NULL,
    :err => IO::NULL
  )
end