Class: Ibex::Verify::Violation

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/verify/result.rb

Overview

One stable verifier finding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, location:, message:) ⇒ Violation

Returns a new instance of Violation.



13
14
15
16
17
18
# File 'lib/ibex/verify/result.rb', line 13

def initialize(id:, location:, message:)
  @id = id.freeze
  @location = location.freeze
  @message = message.freeze
  freeze
end

Instance Attribute Details

#idObject (readonly)

: String



8
9
10
# File 'lib/ibex/verify/result.rb', line 8

def id
  @id
end

#locationObject (readonly)

: String



9
10
11
# File 'lib/ibex/verify/result.rb', line 9

def location
  @location
end

#messageObject (readonly)

: String



10
11
12
# File 'lib/ibex/verify/result.rb', line 10

def message
  @message
end

Instance Method Details

#to_hObject



21
22
23
# File 'lib/ibex/verify/result.rb', line 21

def to_h
  { id: @id, location: @location, message: @message }.freeze
end