summaryrefslogtreecommitdiff
path: root/new/lib/crys/image_processor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'new/lib/crys/image_processor.rb')
-rw-r--r--new/lib/crys/image_processor.rb20
1 files changed, 18 insertions, 2 deletions
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