Skip to content

Commit 88078ae

Browse files
committed
Update type signatures for serialize_structured_value method in params.rb and params.rbs
1 parent 9836db2 commit 88078ae

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

lib/structured_params/params.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ def format_error_path(attr_name, index = nil)
154154
end
155155

156156
# Serialize structured values
157-
#: (untyped, compact: false) -> untyped
157+
#: (bool, compact: false) -> untyped
158+
#: (bool, compact: true) -> untyped
158159
def serialize_structured_value(value, compact: false)
159160
case value
160161
when Array

sig/structured_params/params.rbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ module StructuredParams
7474
def format_error_path: (Symbol, Integer?) -> String
7575

7676
# Serialize structured values
77-
# : (untyped, compact: false) -> untyped
78-
# : (untyped, compact: true) -> untyped
79-
def serialize_structured_value: (untyped, compact: false) -> untyped
80-
| (untyped, compact: true) -> untyped
77+
# : (bool, compact: false) -> untyped
78+
# : (bool, compact: true) -> untyped
79+
def serialize_structured_value: (bool, compact: false) -> untyped
80+
| (bool, compact: true) -> untyped
8181

8282
# Integrate structured parameter errors into parent errors
8383
# : (untyped, String) -> void

0 commit comments

Comments
 (0)