Class: Rucoa::HandlerConcerns::DiagnosticsPublishable::DiagnosticProvider::OffenseToDiagnosticMapper
- Inherits:
-
Object
- Object
- Rucoa::HandlerConcerns::DiagnosticsPublishable::DiagnosticProvider::OffenseToDiagnosticMapper
- Defined in:
- lib/rucoa/handler_concerns/diagnostics_publishable.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Hash
-
#initialize(offense, source:, uri:) ⇒ OffenseToDiagnosticMapper
constructor
A new instance of OffenseToDiagnosticMapper.
Constructor Details
#initialize(offense, source:, uri:) ⇒ OffenseToDiagnosticMapper
Returns a new instance of OffenseToDiagnosticMapper.
124 125 126 127 128 129 130 131 132 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 124 def initialize( offense, source:, uri: ) @offense = offense @source = source @uri = uri end |
Class Method Details
.call(offense, source:, uri:) ⇒ Hash
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 108 def call( offense, source:, uri: ) new( offense, source: source, uri: uri ).call end |
Instance Method Details
#call ⇒ Hash
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/rucoa/handler_concerns/diagnostics_publishable.rb', line 135 def call { code: code, data: data, message: , range: range, severity: severity, source: source } end |