Sha256: e199e7f80dda29b3d60d4ca2f41f0b76eef49f863802e6fbdb8db8d3cf171a15

Contents?: true

Size: 789 Bytes

Versions: 3

Compression:

Stored size: 789 Bytes

Contents

module RocketJob
  module Category
    # Define the layout for each category of input or output data
    class Output
      include SemanticLogger::Loggable
      include Plugins::Document
      include Category::Base

      embedded_in :job, class_name: "RocketJob::Job", inverse_of: :output_categories

      # Whether to skip nil values returned from the `perform` method.
      #   true: save nil values to the output categories.
      #   false: do not save nil values to the output categories.
      field :nils, type: ::Mongoid::Boolean, default: false

      # Renders [String] the header line.
      # Returns [nil] if no header is needed.
      def render_header
        return if !tabular? || !tabular.requires_header?

        tabular.render_header
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rocketjob-6.0.0.rc3 lib/rocket_job/category/output.rb
rocketjob-6.0.0.rc2 lib/rocket_job/category/output.rb
rocketjob-6.0.0.rc1 lib/rocket_job/category/output.rb