Class: Ibex::Verify::Violation

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

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.

RBS:

  • (id: String, location: String, message: String) -> void

Parameters:

  • id: (String)
  • location: (String)
  • message: (String)


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

#idString (readonly)

Signature:

  • String

Returns:

  • (String)


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

def id
  @id
end

#locationString (readonly)

Signature:

  • String

Returns:

  • (String)


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

def location
  @location
end

#messageString (readonly)

Signature:

  • String

Returns:

  • (String)


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

def message
  @message
end

Instance Method Details

#to_hHash[Symbol, String]

RBS:

  • () -> Hash[Symbol, String]

Returns:

  • (Hash[Symbol, String])


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

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