Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options = Hash.new.tap do |params|
- params[:name] = name unless name.empty?
- params[:host] = host unless host.empty?
- params[:paused] = paused unless paused.empty?
- params[:resolution] = resolution unless resolution.empty?
- params[:contactids] = contactids unless contactids.empty?
- params[:sendtoemail] = sendtoemail unless sendtoemail.empty?
- params[:url] = url unless url.empty?
- params[:encryption] = encryption unless encryption.empty?
- end
- puts options
- result = @conn.put '/api/2.0/checks', {
- :checkid => checkid,
- :name => options[:name],
- :host => options[:host],
- :paused => options[:paused],
- :resolution => options[:resolution],
- :contactids => options[:contactids],
- :sendtoemail => options[:sendtoemail],
- :url => options[:url] }
- #:encryption => host_scheme == 'https' ? true : false }
- end
Advertisement
Add Comment
Please, Sign In to add comment