Class: Kombo::Models::Shared::ExpectedProficiencySingleSelect
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::ExpectedProficiencySingleSelect
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/expected_proficiency_singleselect.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(selected_option_id:, type: 'SINGLE_SELECT') ⇒ ExpectedProficiencySingleSelect
constructor
A new instance of ExpectedProficiencySingleSelect.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(selected_option_id:, type: 'SINGLE_SELECT') ⇒ ExpectedProficiencySingleSelect
Returns a new instance of ExpectedProficiencySingleSelect.
21 22 23 24 25 26 27 |
# File 'lib/kombo/models/shared/expected_proficiency_singleselect.rb', line 21 def initialize(selected_option_id:, type: 'SINGLE_SELECT') @selected_option_id = selected_option_id unless type == 'SINGLE_SELECT' raise ArgumentError, 'Invalid value for type' end @type = 'SINGLE_SELECT' end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/kombo/models/shared/expected_proficiency_singleselect.rb', line 30 def ==(other) return false unless other.is_a? self.class return false unless @selected_option_id == other.selected_option_id return false unless @type == other.type true end |