class << self
Definitions
def [](event_type)
Look up a schema by Matrix event type.
Implementation
def [](event_type)
Registry.instance[event_type]
end
def variant(event_type, subtype)
Look up a variant schema.
Implementation
def variant(event_type, subtype)
Registry.instance.variant(event_type, subtype)
end
def validate(event_hash)
Validate an event hash against its schema.
Implementation
def validate(event_hash)
Registry.instance.validate(event_hash)
end
def valid?(event_hash)
Boolean validation.
Implementation
def valid?(event_hash)
Registry.instance.valid?(event_hash)
end
def event_types
All known base event types.
Implementation
def event_types
Registry.instance.event_types
end
def variant_types
All known variant types as [event_type, subtype] pairs.
Implementation
def variant_types
Registry.instance.variant_types
end
def content_properties(event_type)
Content properties defined by the schema for a given event type.
Implementation
def content_properties(event_type)
Registry.instance.content_properties(event_type)
end
def parse(event_hash)
Parse a raw event hash into a schema-aware Event.
Implementation
def parse(event_hash)
ApplicationService::Event.new(event_hash)
end
def size
Total schemas loaded (base + variants).
Implementation
def size
Registry.instance.size
end