Class: Kombo::Models::Shared::ExpectedProficiencyNumeric

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/kombo/models/shared/expected_proficiency_numeric.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(value:, type: 'NUMERIC') ⇒ ExpectedProficiencyNumeric

Returns a new instance of ExpectedProficiencyNumeric.



21
22
23
24
25
26
27
# File 'lib/kombo/models/shared/expected_proficiency_numeric.rb', line 21

def initialize(value:, type: 'NUMERIC')
  @value = value
  unless type == 'NUMERIC'
    raise ArgumentError, 'Invalid value for type'
  end
  @type = 'NUMERIC'
end

Instance Method Details

#==(other) ⇒ Object



30
31
32
33
34
35
# File 'lib/kombo/models/shared/expected_proficiency_numeric.rb', line 30

def ==(other)
  return false unless other.is_a? self.class
  return false unless @value == other.value
  return false unless @type == other.type
  true
end