Class: Pippi::AutoRunner
- Inherits:
-
Object
- Object
- Pippi::AutoRunner
- Defined in:
- lib/pippi/auto_runner.rb
Instance Attribute Summary collapse
-
#ctx ⇒ Object
readonly
Returns the value of attribute ctx.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(opts = {}) ⇒ AutoRunner
constructor
A new instance of AutoRunner.
Constructor Details
#initialize(opts = {}) ⇒ AutoRunner
Returns a new instance of AutoRunner.
5 6 7 8 9 10 |
# File 'lib/pippi/auto_runner.rb', line 5 def initialize(opts = {}) checkset = opts.fetch(:checkset, 'basic') @ctx = Pippi::Context.new Pippi::CheckLoader.new(@ctx, checkset).checks.each(&:decorate) at_exit { dump } end |
Instance Attribute Details
#ctx ⇒ Object (readonly)
Returns the value of attribute ctx.
3 4 5 |
# File 'lib/pippi/auto_runner.rb', line 3 def ctx @ctx end |
Instance Method Details
#dump ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/pippi/auto_runner.rb', line 12 def dump File.open('log/pippi.log', 'w') do |outfile| @ctx.report.problems.each do |problem| outfile.syswrite("#{problem.to_text}\n") end end end |