Method: OpenC3::MetadataModel#initialize

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

#initialize(scope:, start:, color: nil, metadata:, constraints: nil, type: METADATA_TYPE, updated_at: 0) ⇒ MetadataModel

Returns a new instance of MetadataModel.

Parameters:

  • start (Integer)
    • Time metadata is active in seconds from Epoch

  • color (String) (defaults to: nil)
    • The event color

  • metadata (Hash)
    • Hash of metadata values

  • constraints (Hash) (defaults to: nil)
    • Constraints to apply to the metadata

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



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/openc3/models/metadata_model.rb', line 54

def initialize(
  scope:,
  start:,
  color: nil,
  metadata:,
  constraints: nil,
  type: METADATA_TYPE,
  updated_at: 0
)
  super(start: start, scope: scope, updated_at: updated_at)
  @start = start
  @color = color
  @metadata = 
  @constraints = constraints if constraints
  @type = type # For the as_json, from_json round trip
end