ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
255 stars 106 forks source link

actionpack: Add missing methods to ActionController::Parameters #603

Closed tk0miya closed 3 months ago

tk0miya commented 3 months ago

Some methods for ActionController::Parameters has been missing because they're defined via delegation.

This adds them manually.

refs: https://github.com/rails/rails/blob/v6.0.6.1/actionpack/lib/action_controller/metal/strong_parameters.rb#L214-L215

github-actions[bot] commented 3 months ago

@tk0miya Thanks for your contribution!

Please follow the instructions below for each change. See also: https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md

Available commands

You can use the following commands by commenting on this PR.


actionpack

You changed RBS files for an existing gem. You need to get approval from the reviewers of this gem.

@ksss, please review this pull request. If this change is acceptable, please make a review comment including APPROVE from here. Screen Shot 2024-03-19 at 14 13 36

After that, the PR author or the reviewers can merge this PR. Just comment /merge to merge this PR.

ksss commented 3 months ago
$ bundle exec rbs diff --detail --format diff --type-name 'ActionController::Parameters' --before gems/actionpack/6.0 --after 603
- [::Kernel public] def to_s: () -> ::String
+ [::ActionController::Parameters public] def to_s: () -> ::String

- -
+ [::ActionController::Parameters public] def keys: () -> ::Array[untyped]

- -
+ [::ActionController::Parameters public] def key?: () -> bool

- -
+ [::ActionController::Parameters public] def has_key?: () -> bool

- -
+ [::ActionController::Parameters public] def values: () -> ::Array[untyped]

- -
+ [::ActionController::Parameters public] def has_value?: () -> bool

- -
+ [::ActionController::Parameters public] def empty?: () -> bool

- -
+ [::ActionController::Parameters public] def include?: (untyped) -> bool

- -
+ [::ActionController::Parameters public] def as_json: () -> ::String

- -
+ [::ActionController::Parameters public] def each_key: () { (untyped) -> untyped } -> ::Hash[untyped, untyped] | () -> ::Enumerator[untyped, self]
github-actions[bot] commented 3 months ago

Thanks for your review, @ksss!

@tk0miya, @ksss This PR is ready to be merged. Just comment /merge to merge this PR.

tk0miya commented 3 months ago

/merge

tk0miya commented 3 months ago

@ksss Thank you for reviewing!