Class: Clerk::Models::Components::LogSchema
- Inherits:
-
Object
- Object
- Clerk::Models::Components::LogSchema
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/logschema.rb
Overview
The payload schema of a log event type: the fields its payload
carries, addressed by the dot-paths that payload_filter and
payload_fields accept. Field entries use JSON Schema vocabulary
(type is the data type, enum the accepted values); the event
type identifier lives in event_type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object:, event_type:, fields_:, description: nil, severity: nil, docs_group: nil, matched_event_types: nil) ⇒ LogSchema
constructor
A new instance of LogSchema.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(object:, event_type:, fields_:, description: nil, severity: nil, docs_group: nil, matched_event_types: nil) ⇒ LogSchema
Returns a new instance of LogSchema.
43 44 45 46 47 48 49 50 51 |
# File 'lib/clerk/models/components/logschema.rb', line 43 def initialize(object:, event_type:, fields_:, description: nil, severity: nil, docs_group: nil, matched_event_types: nil) @object = object @event_type = event_type @fields_ = fields_ @description = description @severity = severity @docs_group = docs_group @matched_event_types = matched_event_types end |
Instance Method Details
#==(other) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/clerk/models/components/logschema.rb', line 54 def ==(other) return false unless other.is_a? self.class return false unless @object == other.object return false unless @event_type == other.event_type return false unless @fields_ == other.fields_ return false unless @description == other.description return false unless @severity == other.severity return false unless @docs_group == other.docs_group return false unless @matched_event_types == other.matched_event_types true end |