class OpsviewRest::NotificationMethod
Attributes
opsview[RW]
options[RW]
resource_type[RW]
Public Class Methods
new(opsview, options = {})
click to toggle source
# File lib/opsview_rest/notificationmethod.rb, line 9 def initialize(opsview, options = {}) @options = { name: 'Unknown', master: false, active: true, command: 'notify_by_email', contact_variables: 'EMAIL', save: true, replace: false }.update options @opsview = opsview @resource_type = @options[:type] @options[:master] = (@options[:master] ? 1 : 0) @options[:active] = (@options[:active] ? 1 : 0) save(@options[:replace]) if @options[:save] end