Class: SakaiInfo::QuizMetadata
- Inherits:
-
SakaiObject
- Object
- SakaiObject
- SakaiInfo::QuizMetadata
- Defined in:
- lib/sakai-info/quiz.rb
Overview
metadata
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dbrow ⇒ Object
readonly
Returns the value of attribute dbrow.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #default_serialization ⇒ Object
-
#initialize(dbrow) ⇒ QuizMetadata
constructor
A new instance of QuizMetadata.
Methods inherited from SakaiObject
all_serializations, #dbrow_only_serialization, #dbrow_serialization, descendants, #object_type_serialization, #serialize, #shell_serialization, #summary_serialization, #to_csv, #to_json, #to_yaml
Constructor Details
#initialize(dbrow) ⇒ QuizMetadata
Returns a new instance of QuizMetadata.
1357 1358 1359 1360 1361 1362 1363 |
# File 'lib/sakai-info/quiz.rb', line 1357 def initialize(dbrow) @dbrow = dbrow @id = dbrow[:assessmentmetadataid] @quiz_id = dbrow[:assessmentid] @key = dbrow[:label] @value = dbrow[:entry] end |
Instance Attribute Details
#dbrow ⇒ Object (readonly)
Returns the value of attribute dbrow.
1355 1356 1357 |
# File 'lib/sakai-info/quiz.rb', line 1355 def dbrow @dbrow end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
1355 1356 1357 |
# File 'lib/sakai-info/quiz.rb', line 1355 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
1355 1356 1357 |
# File 'lib/sakai-info/quiz.rb', line 1355 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
1355 1356 1357 |
# File 'lib/sakai-info/quiz.rb', line 1355 def value @value end |
Instance Method Details
#default_serialization ⇒ Object
1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'lib/sakai-info/quiz.rb', line 1365 def default_serialization { "id" => self.id, "quiz" => self.quiz.serialize(:summary), "key" => self.key, "value" => self.value, } end |