Class: CodeHunter::RailsBestPractices::Invoker

Inherits:
Object
  • Object
show all
Extended by:
MethodLogger
Defined in:
lib/code_hunter/rails_best_practices/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/rails_best_practices/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/rails_best_practices/invoker.rb', line 6

def options
  @options
end

Instance Method Details

#invokeObject



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

def invoke
  system(
    "rails_best_practices",
    "--format", "html",
    "--output-file", RailsBestPractices::TEMPORAL_PATHNAME.to_s,
    :out => IO::NULL,
    :err => IO::NULL
  )
end