Class: Kombo::Models::Shared::SummaryRatingNumeric
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::SummaryRatingNumeric
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/summary_rating_numeric.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type:, min: nil, max: nil, value: nil) ⇒ SummaryRatingNumeric
constructor
A new instance of SummaryRatingNumeric.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(type:, min: nil, max: nil, value: nil) ⇒ SummaryRatingNumeric
Returns a new instance of SummaryRatingNumeric.
25 26 27 28 29 30 31 32 33 |
# File 'lib/kombo/models/shared/summary_rating_numeric.rb', line 25 def initialize(type:, min: nil, max: nil, value: nil) unless type == 'NUMERIC' raise ArgumentError, 'Invalid value for type' end @type = 'NUMERIC' @min = min @max = max @value = value end |
Instance Method Details
#==(other) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/kombo/models/shared/summary_rating_numeric.rb', line 36 def ==(other) return false unless other.is_a? self.class return false unless @type == other.type return false unless @min == other.min return false unless @max == other.max return false unless @value == other.value true end |