Class: Kombo::Models::Shared::Schema2Object1
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::Schema2Object1
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/schema2_object_1.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(label:, required:, type:, properties:, description: nil, unified_key: nil) ⇒ Schema2Object1
constructor
A new instance of Schema2Object1.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(label:, required:, type:, properties:, description: nil, unified_key: nil) ⇒ Schema2Object1
Returns a new instance of Schema2Object1.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/kombo/models/shared/schema2_object_1.rb', line 29 def initialize(label:, required:, type:, properties:, description: nil, unified_key: nil) @label = label @required = required unless type == 'object' raise ArgumentError, 'Invalid value for type' end @type = 'object' @properties = properties @description = description @unified_key = unified_key end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/kombo/models/shared/schema2_object_1.rb', line 42 def ==(other) return false unless other.is_a? self.class return false unless @label == other.label return false unless @required == other.required return false unless @type == other.type return false unless @properties == other.properties return false unless @description == other.description return false unless @unified_key == other.unified_key true end |