summaryrefslogtreecommitdiff
path: root/new/lib/crys/image_processor.rb
blob: 306c0769645948866a74efaac0ffd9afe29b892c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Crys
  class ImageProcessor
    def initialize(path:, filename:, width: :auto)
      @path = path
      @filename = filename
      @file = File.read(path)
      @width = width
    end

    def relative_path
      filename
    end

    def processed_asset
      file.to_s
    end

    private

    attr_reader :path, :filename, :file
  end
end