Class: Petitest::Texts::TimesText
- Defined in:
- lib/petitest/texts/times_text.rb
Constant Summary
Constants inherited from BaseText
BaseText::ANSI_COLOR_CODE_BY_COLOR_TYPE
Instance Attribute Summary collapse
- #finished_at ⇒ Time readonly
- #started_at ⇒ Time readonly
Instance Method Summary collapse
-
#initialize(finished_at:, started_at:) ⇒ TimesText
constructor
A new instance of TimesText.
- #to_s ⇒ Object
Constructor Details
#initialize(finished_at:, started_at:) ⇒ TimesText
Returns a new instance of TimesText.
14 15 16 17 18 19 20 |
# File 'lib/petitest/texts/times_text.rb', line 14 def initialize( finished_at:, started_at: ) @finished_at = finished_at @started_at = started_at end |
Instance Attribute Details
#finished_at ⇒ Time (readonly)
7 8 9 |
# File 'lib/petitest/texts/times_text.rb', line 7 def finished_at @finished_at end |
#started_at ⇒ Time (readonly)
10 11 12 |
# File 'lib/petitest/texts/times_text.rb', line 10 def started_at @started_at end |
Instance Method Details
#to_s ⇒ Object
Note:
Override
23 24 25 26 27 28 |
# File 'lib/petitest/texts/times_text.rb', line 23 def to_s [ heading, indent(body, 2), ].join("\n\n") end |