Class: Rucoa::HandlerConcerns::DiagnosticsPublishable::DiagnosticProvider
- Inherits:
-
Object
- Object
- Rucoa::HandlerConcerns::DiagnosticsPublishable::DiagnosticProvider
- Defined in:
- lib/rucoa/handler_concerns/diagnostics_publishable.rb
Defined Under Namespace
Classes: OffenseToDiagnosticMapper
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Array<Hash>
-
#initialize(source:, uri:) ⇒ DiagnosticProvider
constructor
A new instance of DiagnosticProvider.
Constructor Details
#initialize(source:, uri:) ⇒ DiagnosticProvider
Returns a new instance of DiagnosticProvider.
56 57 58 59 60 61 62 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 56 def initialize( source:, uri: ) @source = source @uri = uri end |
Class Method Details
.call(source:, uri:) ⇒ Array<Hash>
47 48 49 50 51 52 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 47 def self.call(source:, uri:) new( source: source, uri: uri ).call end |
Instance Method Details
#call ⇒ Array<Hash>
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 65 def call return [] unless Rubocop::ConfigurationChecker.call offenses.map do |offense| OffenseToDiagnosticMapper.call( offense, source: @source, uri: @uri ) end end |