From bfd8209ad0d80b5027bea8a1a095dadc8bffdc61 Mon Sep 17 00:00:00 2001 From: mms Date: Sun, 5 Jan 2025 22:34:55 +0100 Subject: feat(new): splash page in progress --- new/lib/crys/image_processor.rb | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'new/lib/crys/image_processor.rb') diff --git a/new/lib/crys/image_processor.rb b/new/lib/crys/image_processor.rb index 1a33d04..b7e2fd6 100644 --- a/new/lib/crys/image_processor.rb +++ b/new/lib/crys/image_processor.rb @@ -1,10 +1,26 @@ module Crys class ImageProcessor - def initialize(path:, width:, height:, format:) + def initialize(path:, filename:, width: :auto) + @path = path + @filename = filename + @file = File.read(path) end - def path + def relative_path + filename + end + + def filename + filename + end + def processed_asset + file.to_s end + + private + + attr_reader :path, :filename, :file + end end -- cgit v1.2.3