class Stingray::Monitor
Attributes
monitor[RW]
monitor_hash[RW]
monitors[RW]
name[RW]
Public Instance Methods
create(name)
click to toggle source
create a new monitor
# File lib/stingray/monitors.rb, line 22 def create(name) @name=name @monitor_hash=Map.new.set(:properties, :basic, :http, :path) end
destroy()
click to toggle source
destroy the current monitor.
# File lib/stingray/monitors.rb, line 34 def destroy return if @name.nil? delete_rest "monitors/#{@name}" end
save()
click to toggle source
Save the current monitor.
# File lib/stingray/monitors.rb, line 28 def save return if @monitor_hash.nil? put_rest "monitors/#{@name}", @monitor_hash, :content_type => "application/json" end