Class: Aid::Scripts::Doctor::CommandRemedy
- Includes:
- Colorize
- Defined in:
- lib/aid/scripts/doctor.rb
Constant Summary
Constants included from Colorize
Instance Method Summary collapse
- #auto_fix! ⇒ Object
- #auto_fixable? ⇒ Boolean
-
#initialize(shell_command) ⇒ CommandRemedy
constructor
A new instance of CommandRemedy.
- #to_s ⇒ Object
Methods included from Colorize
Constructor Details
#initialize(shell_command) ⇒ CommandRemedy
Returns a new instance of CommandRemedy.
90 91 92 |
# File 'lib/aid/scripts/doctor.rb', line 90 def initialize(shell_command) super end |
Instance Method Details
#auto_fix! ⇒ Object
98 99 100 101 |
# File 'lib/aid/scripts/doctor.rb', line 98 def auto_fix! puts "==> running #{colorize(:command, "$ #{shell_command}")}" system(shell_command) end |
#auto_fixable? ⇒ Boolean
94 95 96 |
# File 'lib/aid/scripts/doctor.rb', line 94 def auto_fixable? true end |
#to_s ⇒ Object
103 104 105 |
# File 'lib/aid/scripts/doctor.rb', line 103 def to_s "run #{colorize :command, shell_command}" end |