Class: Ibex::DeltaReducer::Result

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

Overview

Immutable outcome of a bounded reduction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items:, trials:, complete:, original_size:) ⇒ Result

Returns a new instance of Result.

RBS:

  • (items: Array[untyped], trials: Integer, complete: bool, original_size: Integer) -> void

Parameters:

  • items: (Array[untyped])
  • trials: (Integer)
  • complete: (Boolean)
  • original_size: (Integer)


15
16
17
18
19
20
21
# File 'lib/ibex/delta_reducer.rb', line 15

def initialize(items:, trials:, complete:, original_size:)
  @items = items.freeze
  @trials = trials
  @complete = complete
  @original_size = original_size
  freeze
end

Instance Attribute Details

#completeBoolean (readonly)

Signature:

  • bool

Returns:

  • (Boolean)


11
12
13
# File 'lib/ibex/delta_reducer.rb', line 11

def complete
  @complete
end

#itemsArray[untyped] (readonly)

Signature:

  • Array[untyped]

Returns:

  • (Array[untyped])


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

def items
  @items
end

#original_sizeInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


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

def original_size
  @original_size
end

#trialsInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


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

def trials
  @trials
end