Skip to content

Commit cd3618c

Browse files
committed
refactor: update parameter naming for build_url method to use options
1 parent 3083284 commit cd3618c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/imagekit/helpers/helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ module Helpers
55
class Helper
66
# Builds a URL with transformations applied
77
#
8-
# @param transformations [Array<Imagekit::Models::Transformation>] Array of transformation objects
8+
# @param options [Imagekit::Models::SrcOptions] Options for generating ImageKit URLs with transformations
99
# @return [String] The built URL with transformations
10-
def build_url(transformations)
10+
def build_url(options)
1111
# TODO: Implement actual URL building logic
1212
# For now, return a fixed URL as requested
1313
"https://ik.imagekit.io/your_imagekit_id/sample-image.jpg?tr=w-400,h-300"

rbi/imagekit/helpers/helper.rbi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ module Imagekit
99
# Builds a URL with transformations applied
1010
sig do
1111
params(
12-
transformations: T::Array[Imagekit::Models::Transformation]
12+
options: Imagekit::Models::SrcOptions
1313
).returns(String)
1414
end
15-
def build_url(transformations); end
15+
def build_url(options); end
1616

1717
# Generates transformation string from transformation objects
1818
sig do

sig/imagekit/helpers/helper.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Imagekit
44
def initialize: (client: Imagekit::Client) -> void
55

66
# Builds a URL with transformations applied
7-
def build_url: (Array[Imagekit::Models::Transformation] transformations) -> String
7+
def build_url: (Imagekit::Models::SrcOptions options) -> String
88

99
# Generates transformation string from transformation objects
1010
def build_transformation_string: (Array[Imagekit::Models::Transformation] transformations) -> String

0 commit comments

Comments
 (0)