Class: Clerk::Models::Components::LogSchemaField
- Inherits:
-
Object
- Object
- Clerk::Models::Components::LogSchemaField
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/logschemafield.rb
Overview
One payload field, addressed by dot-path.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(path:, type:, optional:, enum: nil) ⇒ LogSchemaField
constructor
A new instance of LogSchemaField.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(path:, type:, optional:, enum: nil) ⇒ LogSchemaField
Returns a new instance of LogSchemaField.
30 31 32 33 34 35 |
# File 'lib/clerk/models/components/logschemafield.rb', line 30 def initialize(path:, type:, optional:, enum: nil) @path = path @type = type @optional = optional @enum = enum end |
Instance Method Details
#==(other) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/clerk/models/components/logschemafield.rb', line 38 def ==(other) return false unless other.is_a? self.class return false unless @path == other.path return false unless @type == other.type return false unless @optional == other.optional return false unless @enum == other.enum true end |