Class: Uptrends::Probe

Inherits:
Base
  • Object
show all
Defined in:
lib/uptrends/probe.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

check_error!, #create!, #delete!, #initialize, parse, #to_s, #update!

Constructor Details

This class inherits a constructor from Uptrends::Base

Instance Method Details

#disableObject



11
12
13
14
# File 'lib/uptrends/probe.rb', line 11

def disable
  self.is_active = false
  self.update!
end

#disable_alertsObject



21
22
23
24
# File 'lib/uptrends/probe.rb', line 21

def disable_alerts
  self.generate_alert = false
  self.update!
end

#enableObject



6
7
8
9
# File 'lib/uptrends/probe.rb', line 6

def enable
  self.is_active = true
  self.update!
end

#enable_alertsObject



16
17
18
19
# File 'lib/uptrends/probe.rb', line 16

def enable_alerts
  self.generate_alert = true
  self.update!
end