Method: OpenC3::SortedModel#initialize

Defined in:
lib/openc3/models/sorted_model.rb

#initialize(start:, scope:, type: SORTED_TYPE, **kwargs) ⇒ SortedModel

Returns a new instance of SortedModel.

Parameters:

  • start (Integer)
    • start used to store data

  • scope (String)
    • OpenC3 scope to track event to

  • kwargs (Anything)
    • Any kwargs to store in the JSON



96
97
98
99
100
101
# File 'lib/openc3/models/sorted_model.rb', line 96

def initialize(start:, scope:, type: SORTED_TYPE, **kwargs)
  # Name becomes the start in the base class
  super(self.class.pk(scope), name: start.to_s, scope: scope, **kwargs)
  @type = type # For the as_json, from_json round trip
  @start = start
end