Class: Perus::Pinger::Upgrade
- Defined in:
- lib/perus/pinger/commands/upgrade.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
abstract!, abstract?, #cleanup, #darwin?, description, human_name, inherited, #initialize, metric!, metric?, option, options, #shell, subclasses
Constructor Details
This class inherits a constructor from Perus::Pinger::Command
Instance Method Details
#run ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/perus/pinger/commands/upgrade.rb', line 6 def run if .sudo result = shell('sudo gem update perus') else result = shell('gem update perus') end result.include?('ERROR') ? result : true end |