Class: Kiba::Extend::Mixins::IterativeCleanup::KnownWorksheetValues

Inherits:
Object
  • Object
show all
Defined in:
lib/kiba/extend/mixins/iterative_cleanup/known_worksheet_values.rb

Overview

Since:

  • 4.0.0

Instance Method Summary collapse

Constructor Details

#initialize(mod) ⇒ KnownWorksheetValues

Returns a new instance of KnownWorksheetValues.

Since:

  • 4.0.0



11
12
13
14
15
16
# File 'lib/kiba/extend/mixins/iterative_cleanup/known_worksheet_values.rb', line 11

def initialize(mod)
  @mod = mod
  @field = mod.collated_orig_values_id_field
    .to_s
  @values = nil
end

Instance Method Details

#callObject

Since:

  • 4.0.0



18
19
20
21
22
23
24
# File 'lib/kiba/extend/mixins/iterative_cleanup/known_worksheet_values.rb', line 18

def call
  return values if values

  @values = Set.new
  mod.provided_worksheets.each { |file| extract_values(file) }
  values
end