Class: ActsAsCalculatorEditor::ExportLookupTables

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_calculator_editor/export_lookup_tables.rb

Overview

The lookup_tables section of an import document. The core gem has no SerializeLookupTable to borrow (docs/core-gem-contract.md ยง4.4), so the shape is built from the migration's own columns.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key: nil, scope: nil) ⇒ ExportLookupTables

Returns a new instance of ExportLookupTables.



12
13
14
15
# File 'lib/acts_as_calculator_editor/export_lookup_tables.rb', line 12

def initialize(key: nil, scope: nil)
  @key = key
  @scope = scope
end

Class Method Details

.callObject



8
9
10
# File 'lib/acts_as_calculator_editor/export_lookup_tables.rb', line 8

def self.call(...)
  new(...).call
end

Instance Method Details

#callObject



17
18
19
# File 'lib/acts_as_calculator_editor/export_lookup_tables.rb', line 17

def call
  tables.map { |table| entry(table) }
end