summaryrefslogtreecommitdiff
path: root/new/lib/crys/processors/common_parts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'new/lib/crys/processors/common_parts.rb')
-rw-r--r--new/lib/crys/processors/common_parts.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/new/lib/crys/processors/common_parts.rb b/new/lib/crys/processors/common_parts.rb
index 4e1dae56..a6c2dc16 100644
--- a/new/lib/crys/processors/common_parts.rb
+++ b/new/lib/crys/processors/common_parts.rb
@@ -1,18 +1,18 @@
+# frozen_string_literal: true
+
module Crys
module CommonParts
def webbutton(file:, url:, alt:)
- full_path = image_dir + "/buttons/" + file
-
+ full_path = "#{image_dir}/buttons/#{file}"
+
image = ::Crys::ImageProcessor.new(path: full_path, filename: file, width: 88)
assets << image
- code = ERB.new <<-EOF
-<a href="<%=url%>"><img src="<%=image.relative_path%>" width="88" height="31" class="webbutton" alt="<%=alt%>"></a>
-EOF
+ code = ERB.new <<~EOF
+ <a href="<%=url%>"><img src="<%=image.relative_path%>" width="88" height="31" class="webbutton" alt="<%=alt%>"></a>
+ EOF
code.result(binding)
-
end
-
end
end