Skip to content

Commit caf5b43

Browse files
committed
Fix type definition for RQRCode::QRCode#initialize method to accept variadic arguments.
The `RQRCode::QRCode#initialize` method accepts a string as the first parameter and additional optional arguments. References: - https://www.rubydoc.info/gems/rqrcode/2.2.0/RQRCode/QRCode#initialize-instance_method - https://github.com/whomwah/rqrcode/blob/v2.2.0/lib/rqrcode/qrcode/qrcode.rb
1 parent 43b158b commit caf5b43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gems/rqrcode/2.2/_test/test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
require "rqrcode"
55

6-
qr = RQRCode::QRCode.new("https://kyan.com")
6+
qr = RQRCode::QRCode.new("https://kyan.com", level: :h)
77

88
puts qr.to_s
99

gems/rqrcode/2.2/rqrcode.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RQRCode
44
type mode = :number | :alphanumeric | :byte_8bit | :kanji
55
type segment = { data: String, mode: mode }
66

7-
def initialize: (String) -> void
7+
def initialize: (String, *untyped) -> void
88
def as_svg: (?offset: Integer, ?fill: String | :white | :currentColor, ?color: String | :black | :currentColor, ?module_size: Integer, ?shape_rendering: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision", ?standalone: bool, ?use_path: bool, ?viewbox: bool, ?svg_attributes: Hash[untyped, untyped]) -> String
99
def as_png: (?fill: untyped, ?color: untyped, ?size: Integer, ?border_modules: Integer, ?module_px_size: Integer, ?border: Integer, ?resize_exactly_to: bool, ?resize_gte_to: bool) -> ChunkyPNG::Image
1010
| (file: untyped, ?fill: untyped, ?color: untyped, ?color_mode: Integer, ?bit_depth: Integer, ?interlace: bool, ?compression: untyped, ?size: Integer, ?border_modules: Integer, ?module_px_size: Integer, ?border: Integer, ?resize_exactly_to: bool, ?resize_gte_to: bool) -> ChunkyPNG::Image

0 commit comments

Comments
 (0)