Class: RMonitor::Commands::Update
- Inherits:
-
Object
- Object
- RMonitor::Commands::Update
- Defined in:
- lib/rmonitor/commands/update.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options = {}) ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize(options = {}) ⇒ Update
Returns a new instance of Update.
4 5 6 7 |
# File 'lib/rmonitor/commands/update.rb', line 4 def initialize( = {}) @invoke = [:invoke] || Invoke.new() @selector = [:selector] || Selector.new() end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rmonitor/commands/update.rb', line 9 def execute profile = @selector.first_invokable raise NoInvokableProfileError unless profile @invoke.execute(profile[:name]) end |