Class: RMonitor::Commands::CL::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/rmonitor/commands/cl/update.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Update

Returns a new instance of Update.



7
8
9
10
# File 'lib/rmonitor/commands/cl/update.rb', line 7

def initialize(options = {})
  @err = options[:err] || $stderr
  @update = options[:update] || RMonitor::Commands::Update.new(options)
end

Instance Method Details

#executeObject



12
13
14
15
16
# File 'lib/rmonitor/commands/cl/update.rb', line 12

def execute
  @update.execute
rescue RMonitor::NoInvokableProfileError
  @err.puts "no invokable profile"
end