Method: OpenC3::ActivityModel#initialize
- Defined in:
- lib/openc3/models/activity_model.rb
#initialize(name:, start:, stop:, kind:, data:, scope:, updated_at: 0, fulfillment: nil, uuid: nil, events: nil, recurring: {}) ⇒ ActivityModel
Returns a new instance of ActivityModel.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/openc3/models/activity_model.rb', line 164 def initialize( name:, # part of Model start:, stop:, kind:, data:, scope:, # part of Model updated_at: 0, # part of Model fulfillment: nil, uuid: nil, events: nil, recurring: {} ) super("#{scope}#{PRIMARY_KEY}__#{name}", name: name, scope: scope) # Validate everything that isn't already in Model set_input( start: start, stop: stop, kind: kind, data: data, fulfillment: fulfillment, uuid: uuid, events: events, recurring: recurring, ) @updated_at = updated_at end |