Method: OpenC3::ReactionModel#initialize
- Defined in:
- lib/openc3/models/reaction_model.rb
#initialize(name:, scope:, snooze:, actions:, triggers:, triggerLevel:, enabled: true, snoozed_until: nil, username: nil, updated_at: nil) ⇒ ReactionModel
Returns a new instance of ReactionModel.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/openc3/models/reaction_model.rb', line 87 def initialize( name:, scope:, snooze:, actions:, triggers:, triggerLevel:, enabled: true, snoozed_until: nil, username: nil, updated_at: nil ) super("#{scope}#{PRIMARY_KEY}", name: name, scope: scope) @microservice_name = "#{scope}__OPENC3__REACTION" @enabled = enabled @snoozed_until = snoozed_until @triggerLevel = validate_level(triggerLevel) @snooze = validate_snooze(snooze) @actions = validate_actions(actions) @triggers = validate_triggers(triggers) @username = username @updated_at = updated_at end |