Sha256: 61d0a553a8f6c94ac7f6aa252581b2a8ffcaac1e05f467b44e34ad424c6ec0eb

Contents?: true

Size: 800 Bytes

Versions: 8

Compression:

Stored size: 800 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
  module Library
    module IO
      # Common configuration/code for all IO Job subclasses that open a file.
      class OpenFileBase < JobWithRegister
        attr_reader :binary, :disk, :path

        def initialize(path:, binary: false, disk: {}, name: '', register: DEFAULT_REGISTER)
          super(name: name, register: register)

          raise ArgumentError, 'path is required' if path.to_s.empty?

          @binary = binary || false
          @disk   = Disks.make(disk)
          @path   = path.to_s

          freeze
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
burner-1.12.0 lib/burner/library/io/open_file_base.rb
burner-1.11.0 lib/burner/library/io/open_file_base.rb
burner-1.10.0 lib/burner/library/io/open_file_base.rb
burner-1.9.0 lib/burner/library/io/open_file_base.rb
burner-1.9.0.pre.alpha lib/burner/library/io/open_file_base.rb
burner-1.8.0 lib/burner/library/io/open_file_base.rb
burner-1.7.0 lib/burner/library/io/open_file_base.rb
burner-1.7.0.pre.alpha lib/burner/library/io/open_file_base.rb