Sha256: 33add63bc6fa0827d6e77695b0a3edb8f19048201941ac4f1c4810ce6c26b638

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2020-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

module Burner
  class Jobs
    # Output a simple message to the output.
    class Echo < Job
      attr_reader :message

      def initialize(name:, message: '')
        super(name: name)

        @message = message.to_s

        freeze
      end

      def perform(output, _payload, params)
        compiled_message = eval_string_template(message, params)

        output.detail(compiled_message)

        nil
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
burner-1.0.0.pre.alpha.3 lib/burner/jobs/echo.rb
burner-1.0.0.pre.alpha.2 lib/burner/jobs/echo.rb
burner-1.0.0.pre.alpha.1 lib/burner/jobs/echo.rb
burner-1.0.0.pre.alpha lib/burner/jobs/echo.rb