Class: MinitestBender::ResultContext
- Inherits:
-
String
- Object
- String
- MinitestBender::ResultContext
- Defined in:
- lib/minitest-bender/result_context.rb
Constant Summary collapse
- PREFIX =
'• '- SEPARATOR =
' ▸ '- CLASS_SEPARATOR =
'::'
Instance Method Summary collapse
-
#initialize(class_name) ⇒ ResultContext
constructor
A new instance of ResultContext.
- #path ⇒ Object
- #prefix ⇒ Object
- #separator ⇒ Object
- #with_prefix ⇒ Object
Constructor Details
#initialize(class_name) ⇒ ResultContext
Returns a new instance of ResultContext.
10 11 12 13 |
# File 'lib/minitest-bender/result_context.rb', line 10 def initialize(class_name) @class_name = class_name super(path.join(separator)) end |
Instance Method Details
#path ⇒ Object
15 16 17 |
# File 'lib/minitest-bender/result_context.rb', line 15 def path class_name.split(class_separator) end |
#prefix ⇒ Object
27 28 29 |
# File 'lib/minitest-bender/result_context.rb', line 27 def prefix PREFIX end |
#separator ⇒ Object
23 24 25 |
# File 'lib/minitest-bender/result_context.rb', line 23 def separator SEPARATOR end |
#with_prefix ⇒ Object
19 20 21 |
# File 'lib/minitest-bender/result_context.rb', line 19 def with_prefix prefix + self end |