Class: StackOne::Models::Shared::Question
- Inherits:
-
Object
- Object
- StackOne::Models::Shared::Question
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/stack_one/models/shared/question.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id: nil, multiple_choice_answers: nil, name: nil, parent_question: nil, remote_id: nil, required: nil, text: nil, type: nil) ⇒ Question
constructor
A new instance of Question.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(id: nil, multiple_choice_answers: nil, name: nil, parent_question: nil, remote_id: nil, required: nil, text: nil, type: nil) ⇒ Question
Returns a new instance of Question.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/stack_one/models/shared/question.rb', line 33 def initialize(id: nil, multiple_choice_answers: nil, name: nil, parent_question: nil, remote_id: nil, required: nil, text: nil, type: nil) @id = id @multiple_choice_answers = multiple_choice_answers @name = name @parent_question = parent_question @remote_id = remote_id @required = required @text = text @type = type end |
Instance Method Details
#==(other) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/stack_one/models/shared/question.rb', line 45 def ==(other) return false unless other.is_a? self.class return false unless @id == other.id return false unless @multiple_choice_answers == other.multiple_choice_answers return false unless @name == other.name return false unless @parent_question == other.parent_question return false unless @remote_id == other.remote_id return false unless @required == other.required return false unless @text == other.text return false unless @type == other.type true end |