Class: LearnDoctor::HealthCheck::StepInstaller

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step) ⇒ StepInstaller

Returns a new instance of StepInstaller.



7
8
9
10
11
12
# File 'lib/learn_doctor/health_check/step_installer.rb', line 7

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

Instance Attribute Details

#fileObject

Returns the value of attribute file.



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

def file
  @file
end

#password_requiredObject (readonly)

Returns the value of attribute password_required.



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

def password_required
  @password_required
end

#resultObject

Returns the value of attribute result.



5
6
7
# File 'lib/learn_doctor/health_check/step_installer.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_installer.rb', line 4

def step
  @step
end

#sudoObject (readonly)

Returns the value of attribute sudo.



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

def sudo
  @sudo
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
# File 'lib/learn_doctor/health_check/step_installer.rb', line 14

def execute
  set_file
  run_install_for_step
  print_result
  unlink_file!

  self
end