Class: Rafflesia::Grade
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::Grade
- Defined in:
- lib/rafflesia/episodes/grade.rb
Constant Summary collapse
- HASH_ATTRS =
{ blocking_errors: :blocking_errors, grader_hash: :grader_hash, metrics: :metrics, pass_score: :pass_score, passed: :passed, reward: :reward, reward_definition_id: :reward_definition_id, subscores: :subscores, warnings: :warnings, weights: :weights }.freeze
Instance Attribute Summary collapse
-
#blocking_errors ⇒ Object
Returns the value of attribute blocking_errors.
-
#grader_hash ⇒ Object
Returns the value of attribute grader_hash.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#pass_score ⇒ Object
Returns the value of attribute pass_score.
-
#passed ⇒ Object
Returns the value of attribute passed.
-
#reward ⇒ Object
Returns the value of attribute reward.
-
#reward_definition_id ⇒ Object
Returns the value of attribute reward_definition_id.
-
#subscores ⇒ Object
Returns the value of attribute subscores.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
-
#weights ⇒ Object
Returns the value of attribute weights.
Instance Method Summary collapse
-
#initialize(json) ⇒ Grade
constructor
A new instance of Grade.
Constructor Details
#initialize(json) ⇒ Grade
Returns a new instance of Grade.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/episodes/grade.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @blocking_errors = (hash[:blocking_errors] || []) @grader_hash = hash[:grader_hash] @metrics = hash[:metrics] || {} @pass_score = hash[:pass_score] @passed = hash[:passed] @reward = hash[:reward] @reward_definition_id = hash[:reward_definition_id] @subscores = hash[:subscores] || {} @warnings = (hash[:warnings] || []) @weights = hash[:weights] || {} end |
Instance Attribute Details
#blocking_errors ⇒ Object
Returns the value of attribute blocking_errors.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def blocking_errors @blocking_errors end |
#grader_hash ⇒ Object
Returns the value of attribute grader_hash.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def grader_hash @grader_hash end |
#metrics ⇒ Object
Returns the value of attribute metrics.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def metrics @metrics end |
#pass_score ⇒ Object
Returns the value of attribute pass_score.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def pass_score @pass_score end |
#passed ⇒ Object
Returns the value of attribute passed.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def passed @passed end |
#reward ⇒ Object
Returns the value of attribute reward.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def reward @reward end |
#reward_definition_id ⇒ Object
Returns the value of attribute reward_definition_id.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def reward_definition_id @reward_definition_id end |
#subscores ⇒ Object
Returns the value of attribute subscores.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def subscores @subscores end |
#warnings ⇒ Object
Returns the value of attribute warnings.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def warnings @warnings end |
#weights ⇒ Object
Returns the value of attribute weights.
21 22 23 |
# File 'lib/rafflesia/episodes/grade.rb', line 21 def weights @weights end |