Class: Datanorm::Documents::Preprocesses::Process

Inherits:
Object
  • Object
show all
Includes:
Calls, Logging
Defined in:
lib/datanorm/documents/preprocesses/process.rb

Overview

Takes one record of a Datanorm file and saves it to disk in an organized way for later use.

Instance Method Summary collapse

Methods included from Logging

included

Instance Method Details

#callObject

One common combo is [A], [B], [D] per product throughout the whole file. In that case, the ID is the same for all three.

Another variant is all [T] at the beginning and then [A] etc. at the end of the file. In that case the IDs of [T] are separate and later referenced in [A].



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/datanorm/documents/preprocesses/process.rb', line 19

def call
  if record.kind_dimension? || record.kind_text?
    cache_longtext

  elsif record.kind_extra?
    cache_json

  elsif record.kind_priceset?
    cache_priceset

  elsif record.kind_product?
    cache_product
  end
end