Class: Kombo::Models::Shared::AttributeSubResult
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::AttributeSubResult
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/attribute_subresult.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type:, id:, label:, score:, status:) ⇒ AttributeSubResult
constructor
A new instance of AttributeSubResult.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(type:, id:, label:, score:, status:) ⇒ AttributeSubResult
Returns a new instance of AttributeSubResult.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kombo/models/shared/attribute_subresult.rb', line 27 def initialize(type:, id:, label:, score:, status:) unless type == 'SUB_RESULT' raise ArgumentError, 'Invalid value for type' end @type = 'SUB_RESULT' @id = id @label = label @score = score @status = status end |
Instance Method Details
#==(other) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/kombo/models/shared/attribute_subresult.rb', line 39 def ==(other) return false unless other.is_a? self.class return false unless @type == other.type return false unless @id == other.id return false unless @label == other.label return false unless @score == other.score return false unless @status == other.status true end |