Class: Moodle2CC::CanvasCC::Models::Answer
- Inherits:
-
Object
- Object
- Moodle2CC::CanvasCC::Models::Answer
- Defined in:
- lib/moodle2cc/canvas_cc/models/answer.rb
Instance Attribute Summary collapse
-
#answer_format ⇒ Object
Returns the value of attribute answer_format.
-
#answer_text ⇒ Object
Returns the value of attribute answer_text.
-
#feedback ⇒ Object
Returns the value of attribute feedback.
-
#feedback_format ⇒ Object
Returns the value of attribute feedback_format.
-
#fraction ⇒ Object
Returns the value of attribute fraction.
-
#id ⇒ Object
Returns the value of attribute id.
-
#resp_ident ⇒ Object
Returns the value of attribute resp_ident.
Instance Method Summary collapse
-
#initialize(answer = nil) ⇒ Answer
constructor
A new instance of Answer.
Constructor Details
#initialize(answer = nil) ⇒ Answer
Returns a new instance of Answer.
5 6 7 8 9 10 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 5 def initialize(answer=nil) return unless answer answer.instance_variables.each do |var| self.instance_variable_set(var, answer.instance_variable_get(var)) end end |
Instance Attribute Details
#answer_format ⇒ Object
Returns the value of attribute answer_format.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def answer_format @answer_format end |
#answer_text ⇒ Object
Returns the value of attribute answer_text.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def answer_text @answer_text end |
#feedback ⇒ Object
Returns the value of attribute feedback.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def feedback @feedback end |
#feedback_format ⇒ Object
Returns the value of attribute feedback_format.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def feedback_format @feedback_format end |
#fraction ⇒ Object
Returns the value of attribute fraction.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def fraction @fraction end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def id @id end |
#resp_ident ⇒ Object
Returns the value of attribute resp_ident.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3 def resp_ident @resp_ident end |