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