Class: Ibex::LALR::IELR::Annotation

Inherits:
Struct
  • Object
show all
Defined in:
lib/ibex/lalr/ielr/inadequacy.rb,
sig/ibex/lalr/ielr/inadequacy.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inadequacy:, matrix:) ⇒ Annotation

Returns a new instance of Annotation.



19
20
21
22
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 19

def initialize(inadequacy:, matrix:)
  super(inadequacy: inadequacy, matrix: matrix.freeze)
  freeze
end

Instance Attribute Details

#inadequacyObject

Returns the value of attribute inadequacy

Returns:

  • (Object)

    the current value of inadequacy



18
19
20
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 18

def inadequacy
  @inadequacy
end

#matrixObject

Returns the value of attribute matrix

Returns:

  • (Object)

    the current value of matrix



18
19
20
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 18

def matrix
  @matrix
end

Class Method Details

.newinstance

Parameters:

  • inadequacy: (Inadequacy)
  • matrix: (Array[Integer?])

Returns:

  • (instance)


19
# File 'sig/ibex/lalr/ielr/inadequacy.rbs', line 19

def self.new: (inadequacy: Inadequacy, matrix: Array[Integer?]) -> instance

Instance Method Details

#key[ Integer, Array[Integer?] ]

Returns:

  • ([ Integer, Array[Integer?] ])


24
25
26
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 24

def key
  [inadequacy.id, matrix]
end