Class: GetIgnoredViolation
- Inherits:
-
Object
- Object
- GetIgnoredViolation
- Defined in:
- lib/danger/request_sources/support/get_ignored_violation.rb
Constant Summary collapse
- IGNORE_REGEXP =
/>*\s*danger\s*:\s*ignore\s*"(?<error>[^"]*)"/i.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(body) ⇒ GetIgnoredViolation
constructor
A new instance of GetIgnoredViolation.
Constructor Details
#initialize(body) ⇒ GetIgnoredViolation
Returns a new instance of GetIgnoredViolation.
6 7 8 |
# File 'lib/danger/request_sources/support/get_ignored_violation.rb', line 6 def initialize(body) @body = body end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/danger/request_sources/support/get_ignored_violation.rb', line 10 def call return [] unless body body.chomp.scan(IGNORE_REGEXP).flatten end |