Sha256: 379444550279037e262b0ac920314c2734cd04e97933ad89340b9144e5882d42

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

require_relative 'service_fields'

module Longleaf
  # Definition of a configured preservation service
  class ServiceDefinition
    attr_reader :name
    attr_reader :work_script, :work_class
    attr_reader :frequency, :delay
    attr_reader :properties

    def initialize(name:, work_script:, work_class: nil, frequency: nil, delay: nil, properties: Hash.new)
      raise ArgumentError.new("Parameters name and work_script are required") unless name && work_script

      @properties = properties
      @name = name
      @work_script = work_script
      @work_class = work_class
      @frequency = frequency
      @delay = delay
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
longleaf-1.1.1 lib/longleaf/models/service_definition.rb
longleaf-1.1.0 lib/longleaf/models/service_definition.rb
longleaf-1.0.0 lib/longleaf/models/service_definition.rb
longleaf-0.3.0 lib/longleaf/models/service_definition.rb