Class: Kombo::Models::Shared::PropertiesDate
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::PropertiesDate
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/properties_date.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(label:, required:, type:, description: nil, unified_key: nil) ⇒ PropertiesDate
constructor
A new instance of PropertiesDate.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(label:, required:, type:, description: nil, unified_key: nil) ⇒ PropertiesDate
Returns a new instance of PropertiesDate.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kombo/models/shared/properties_date.rb', line 27 def initialize(label:, required:, type:, description: nil, unified_key: nil) @label = label @required = required unless type == 'date' raise ArgumentError, 'Invalid value for type' end @type = 'date' @description = description @unified_key = unified_key end |
Instance Method Details
#==(other) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/kombo/models/shared/properties_date.rb', line 39 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 @description == other.description return false unless @unified_key == other.unified_key true end |