Class: RocketJob::Category::Output

Inherits:
Object
  • Object
show all
Includes:
Base, Plugins::Document, SemanticLogger::Loggable
Defined in:
lib/rocket_job/category/output.rb

Overview

Define the layout for each category of input or output data

Instance Method Summary collapse

Methods included from Base

#build_collection_name, #serializer_class, #tabular, #tabular?

Instance Method Details

#data_store(job) ⇒ Object



26
27
28
29
30
31
# File 'lib/rocket_job/category/output.rb', line 26

def data_store(job)
  RocketJob::Sliced::Output.new(
    collection_name: build_collection_name(:output, job),
    slice_class:     serializer_class
  )
end

#render_headerObject

Renders [String] the header line. Returns [nil] if no header is needed.



20
21
22
23
24
# File 'lib/rocket_job/category/output.rb', line 20

def render_header
  return if !tabular? || !tabular.requires_header?

  tabular.render_header
end