Class: RSpec::Ci::Prettify::Annotation
- Inherits:
-
Object
- Object
- RSpec::Ci::Prettify::Annotation
- Defined in:
- lib/rspec/ci/prettify/annotation.rb
Instance Attribute Summary collapse
-
#example ⇒ Object
readonly
Returns the value of attribute example.
-
#notification ⇒ Object
readonly
Returns the value of attribute notification.
Instance Method Summary collapse
- #error ⇒ Object
- #file ⇒ Object
-
#initialize(notification) ⇒ Annotation
constructor
A new instance of Annotation.
- #line ⇒ Object
Constructor Details
#initialize(notification) ⇒ Annotation
Returns a new instance of Annotation.
6 7 8 9 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 6 def initialize(notification) @notification = notification @example = notification.example end |
Instance Attribute Details
#example ⇒ Object (readonly)
Returns the value of attribute example.
11 12 13 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 11 def example @example end |
#notification ⇒ Object (readonly)
Returns the value of attribute notification.
11 12 13 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 11 def notification @notification end |
Instance Method Details
#error ⇒ Object
17 18 19 20 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 17 def error msg = notification..join("\n") format_annotation_err(msg) end |
#file ⇒ Object
22 23 24 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 22 def file File.realpath(location.split(':')[0]).sub(/\A#{github_workspace_file_path}#{File::SEPARATOR}/, '') end |
#line ⇒ Object
13 14 15 |
# File 'lib/rspec/ci/prettify/annotation.rb', line 13 def line location.split(':')[1] end |