Class: Kombo::Models::Shared::ScreeningQuestion

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(id:, remote_id: nil, title: nil, description: nil, category: nil, required: nil, format: nil, index: nil, precondition_question_id: nil, precondition_options: nil) ⇒ ScreeningQuestion

Returns a new instance of ScreeningQuestion.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/kombo/models/shared/screening_question.rb', line 37

def initialize(id:, remote_id: nil, title: nil, description: nil, category: nil, required: nil, format: nil, index: nil, precondition_question_id: nil, precondition_options: nil)
  @id = id
  @remote_id = remote_id
  @title = title
  @description = description
  @category = category
  @required = required
  @format = format
  @index = index
  @precondition_question_id = precondition_question_id
  @precondition_options = precondition_options
end

Instance Method Details

#==(other) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/kombo/models/shared/screening_question.rb', line 51

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 @title == other.title
  return false unless @description == other.description
  return false unless @category == other.category
  return false unless @required == other.required
  return false unless @format == other.format
  return false unless @index == other.index
  return false unless @precondition_question_id == other.precondition_question_id
  return false unless @precondition_options == other.precondition_options
  true
end