Class: Fet::ScoreSummary
- Inherits:
-
Object
- Object
- Fet::ScoreSummary
- Extended by:
- ScoreSummaryWriter
- Defined in:
- lib/fet/score_summary.rb
Overview
Responsible for writing + showing the score summary to the user
Constant Summary collapse
- NO_SCORES_MESSAGE =
"No scores available yet!".deep_freeze
Constants included from ScoreSummaryWriter
Fet::ScoreSummaryWriter::SCORES_FILENAME
Instance Method Summary collapse
-
#initialize(minimum_session_length: 0, number_of_degrees: nil, key_type: nil, begin_offset: 0, end_offset: 0) ⇒ ScoreSummary
constructor
A new instance of ScoreSummary.
- #summary ⇒ Object
Methods included from ScoreSummaryWriter
Constructor Details
#initialize(minimum_session_length: 0, number_of_degrees: nil, key_type: nil, begin_offset: 0, end_offset: 0) ⇒ ScoreSummary
Returns a new instance of ScoreSummary.
15 16 17 18 19 20 21 |
# File 'lib/fet/score_summary.rb', line 15 def initialize(minimum_session_length: 0, number_of_degrees: nil, key_type: nil, begin_offset: 0, end_offset: 0) self.minimum_session_length = minimum_session_length self.number_of_degrees = number_of_degrees self.key_type = key_type self.begin_offset = begin_offset self.end_offset = end_offset end |
Instance Method Details
#summary ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/fet/score_summary.rb', line 23 def summary if file_exists? percentage_summary else puts NO_SCORES_MESSAGE end end |