Class: RMonitor::Commands::CL::Invoke
- Inherits:
-
Object
- Object
- RMonitor::Commands::CL::Invoke
- Defined in:
- lib/rmonitor/commands/cl/invoke.rb
Instance Method Summary collapse
- #execute(name) ⇒ Object
-
#initialize(options = {}) ⇒ Invoke
constructor
A new instance of Invoke.
Constructor Details
#initialize(options = {}) ⇒ Invoke
Returns a new instance of Invoke.
7 8 9 10 |
# File 'lib/rmonitor/commands/cl/invoke.rb', line 7 def initialize( = {}) @err = [:err] || $stderr @invoke = [:invoke] || RMonitor::Commands::Invoke.new() end |
Instance Method Details
#execute(name) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rmonitor/commands/cl/invoke.rb', line 12 def execute(name) @invoke.execute(name) rescue RMonitor::UnknownProfileError @err.puts "unknown profile" rescue RMonitor::UninvokableProfileError @err.puts "profile is not invokable" end |