Class: LearnDoctor::HealthCheck::StepChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/learn_doctor/health_check/step_checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step) ⇒ StepChecker

Returns a new instance of StepChecker.



7
8
9
10
# File 'lib/learn_doctor/health_check/step_checker.rb', line 7

def initialize(step)
  @step = step
  @title = step[:title]
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



5
6
7
# File 'lib/learn_doctor/health_check/step_checker.rb', line 5

def file
  @file
end

#resultObject

Returns the value of attribute result.



5
6
7
# File 'lib/learn_doctor/health_check/step_checker.rb', line 5

def result
  @result
end

#stepObject (readonly)

Returns the value of attribute step.



4
5
6
# File 'lib/learn_doctor/health_check/step_checker.rb', line 4

def step
  @step
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/learn_doctor/health_check/step_checker.rb', line 4

def title
  @title
end

Instance Method Details

#executeObject



12
13
14
15
16
17
18
19
# File 'lib/learn_doctor/health_check/step_checker.rb', line 12

def execute
  set_file
  run_check_for_step
  print_result
  unlink_file!

  self
end