Class: Uptrends::ProbeGroup
- Inherits:
-
Base
- Object
- Base
- Uptrends::ProbeGroup
show all
- Defined in:
- lib/uptrends/probe_group.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
#add_probe(probe) ⇒ Object
6
7
8
|
# File 'lib/uptrends/probe_group.rb', line 6
def add_probe(probe)
probe_operation(probe, :post)
end
|
#members ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/uptrends/probe_group.rb', line 14
def members
fail("This group does not have a guid.") unless self.attributes.include?(:guid)
response = @client.class.get("#{api_url}/#{@guid}/members")
self.class.check_error!(response)
Uptrends::Probe.parse(self, response)
end
|
#remove_probe(probe) ⇒ Object
10
11
12
|
# File 'lib/uptrends/probe_group.rb', line 10
def remove_probe(probe)
probe_operation(probe, :delete)
end
|