Sha256: d64069fc0d46235c96bcec99ce7599b5ddefecbcba11bef2cd0b1abc92fa2b85

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

# frozen_string_literal: true

# AppInfo base file
module AppInfo
  class File
    attr_reader :file, :logger

    def initialize(file, logger: AppInfo.logger)
      @file = file
      @logger = logger
    end

    # @abstract Subclass and override {#file_type} to implement
    def file_type
      Platform::UNKNOWN
    end

    # @abstract Subclass and override {#size} to implement
    def size(human_size: false)
      raise NotImplementedError, ".#{__method__} method implantation required in #{self.class}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
app-info-3.0.0.beta1 lib/app_info/file.rb