Class: Ibex::Equiv::Machine::Configuration

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

Overview

One product-search component.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stack:, status:, actions:, reductions: []) ⇒ Configuration

Returns a new instance of Configuration.

RBS:

  • (stack: Array[Integer], status: Symbol?, actions: Integer, ?reductions: Array[Integer]) -> void

Parameters:

  • stack: (Array[Integer])
  • status: (Symbol, nil)
  • actions: (Integer)
  • reductions: (Array[Integer]) (defaults to: [])


18
19
20
21
22
23
24
# File 'lib/ibex/equiv/machine.rb', line 18

def initialize(stack:, status:, actions:, reductions: [])
  @stack = stack.freeze
  @status = status
  @actions = actions
  @reductions = reductions.freeze
  freeze
end

Instance Attribute Details

#actionsInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


14
15
16
# File 'lib/ibex/equiv/machine.rb', line 14

def actions
  @actions
end

#reductionsArray[Integer] (readonly)

Signature:

  • Array[Integer]

Returns:

  • (Array[Integer])


15
16
17
# File 'lib/ibex/equiv/machine.rb', line 15

def reductions
  @reductions
end

#stackArray[Integer] (readonly)

Signature:

  • Array[Integer]

Returns:

  • (Array[Integer])


12
13
14
# File 'lib/ibex/equiv/machine.rb', line 12

def stack
  @stack
end

#statusSymbol? (readonly)

Signature:

  • Symbol?

Returns:

  • (Symbol, nil)


13
14
15
# File 'lib/ibex/equiv/machine.rb', line 13

def status
  @status
end