Class: Petitest::Texts::TestsResultMarginTopText
- Defined in:
- lib/petitest/texts/tests_result_margin_top_text.rb
Constant Summary
Constants inherited from BaseText
BaseText::ANSI_COLOR_CODE_BY_COLOR_TYPE
Instance Attribute Summary collapse
- #tests ⇒ Array<Petitest::Test> readonly
Instance Method Summary collapse
-
#initialize(tests:) ⇒ TestsResultMarginTopText
constructor
A new instance of TestsResultMarginTopText.
- #to_s ⇒ Object
Constructor Details
#initialize(tests:) ⇒ TestsResultMarginTopText
Returns a new instance of TestsResultMarginTopText.
10 11 12 |
# File 'lib/petitest/texts/tests_result_margin_top_text.rb', line 10 def initialize(tests:) @tests = tests end |
Instance Attribute Details
#tests ⇒ Array<Petitest::Test> (readonly)
7 8 9 |
# File 'lib/petitest/texts/tests_result_margin_top_text.rb', line 7 def tests @tests end |
Instance Method Details
#to_s ⇒ Object
Note:
Override
15 16 17 18 19 20 21 |
# File 'lib/petitest/texts/tests_result_margin_top_text.rb', line 15 def to_s if tests.empty? "\n" else "\n\n" end end |